Show Profile Headline in the Posts

I want to add Profile Headline field below the full name, tried finding the way but there isn’t a way

Apart from this there is bug/ problem as in I had enable_name to true in the post and hide the usernames from the post by adding some css rules in the Customize > Theme > Edit CSS/ HTML.

//Hides the username from the Post page
.names .username {
    display: none!important;
}

These settings was working fine but full names also being hidden out for some of the users

Kindly help me out to fix these settings.

Hi Kushal :slight_smile:
Can you clarify what you mean with “Profile Headline field?”

As for hiding usernames, depending on your website’s settings, you can try this:

.names .second.username {
    display: none;
}
1 Like

The above css code is not hiding the usernames of the users.

I am talking about this headline

1 Like

Hence my “depending on your website’s settings”, but that’s on me, I should have started with the default settings, with which the following CSS should work:

.names .first.username {
    display: none;
}

As for the headline below the full name, try this:

.topic-meta-data .names {
    flex-wrap: wrap;
    .user-title {
        width: 100%;
    }
}

image

Be aware that there may be unintended side effects (as often when we do CSS changes of elements that contain multiple children).

2 Likes

CSS settings are working perfectly fine, but I feel issues are different as for some users both username and full name is visible in the post categories whereas for few users only username is visible (from the database only the usernames is getting fetched - checked it via page source).
Apart from this Profile headline css code is perfect but how to fetch the details from the database as in it is not getting fetched from the database so there is no question to making it visible.
Kindly help me out with this

I was a bit fast on this CSS and didn’t check for accounts without full names, so my CSS suggestion is flawed.

Can you provide me the following settings values of your site?

  • full name required

  • prioritize username in ux

1 Like

Full name field is mandatory field since we had started and for the second point i need bit more clarification.

It’s this setting:

:slight_smile:

1 Like

To clarify more all the accounts have both full names and username(verified by visiting their profiles). It’s just that in posts pages full names of few accounts is not getting fetched.

How to add profile header after full name?

Yes this setting is enabled

both the settings is enabled

Thanks for the info :slight_smile:

If you have prioritize username in ux enabled then usernames will be shown on each post if the user’s username and full name are the same.
And you’ll be stuck if you want to hide usernames with CSS only because you can’t target previous elements.

For example, you’ll have two posts that have:

  1. username

    • post content
  2. username full-name

    • post content

And you won’t be able to hide usernames only for users that have a full name different from their username, because the username is displayed before the full name.

It’s a bit complicated to explain :sweat_smile:

So you want a CSS-only solution, you’d need to disable prioritize username in ux and use the following CSS:

.names {
    .full-name +.username {
        display: none;
    }
}

As for the title below the name, you can use this updated CSS

.topic-meta-data .names {
    flex-wrap: wrap;
    .user-title {
        width: 100%;
        order: 1;
    }
}

The order: 1; prevents the users’ status emoji from being next to the title and keep it next to the full name:

If I combine all this CSS, here’s the result.

Before:
image

.topic-meta-data .names {
    flex-wrap: wrap;
    .full-name +.username {
        display: none;
    }
    .user-title {
        width: 100%;
        order: 1;
    }
}

After:
image

3 Likes

Thank you so much for the effort you are making but both this code is not working, even I have added !important in css but still it’s not working.
and for the profile headline it is not coming from the backend see the below snapshot for reference

1 Like

This plugin had helped me to solve the issue which I am getting when username and full name is both same then it is autohiding the one.

Kindly help me out with adding the Profile headline after the full name

1 Like

Can anyone help me with how to make the Profile Headline visible in the Posts page?

@JammyDodger what should I do? Shall I create a new post or is there any other way to solve this issue?

Can you share a link to your forum?

Below is the link of the forum -
https://team.krsh.org

Thank you. :slight_smile:

Please be as precise as possible, because your request is slightly confusing.

By “after”, do you mean “below”?


Your registration form contains a “Profile Headline” field, but I suspect it has nothing to do really with what you ask. You are asking, to my understanding, to put a user’s title below their username

I tried my code from my message on your forum and it works:

Before:
image

After:
image

Is that what you want?

1 Like

I already mentioned that I wanted to Show Profile Headline, if this headline can be shown below the full name that will be awesome, just like in the second picture you have sent in the place of the ‘Internship Secured’ profile headline should be visible.

image