Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing page title for single member


  • pjthiel
    Participant

    @pjthiel

    Hey guys.

    Apologies to have to ask, but I have scoured long and hard over the existing support topics to try and find an answer.

    I am trying to change the page title on single member pages (site/members/username). Currently, the page shows the username (or displayname?) either way… I want to change it to something else.

    I’ve been through all the templates in members/single, and they all seem to construct the content within the div with class=”buddypress”, but none sets the page title.

    Where can I add some code to override the default page title behavior on buddypress pages?

Viewing 3 replies - 1 through 3 (of 3 total)

  • danbp
    Participant

    @danbp

    Hi,

    if you’re comfortable with php, see here:

    bp_modify_page_title

    Here, an example:
    https://buddypress.org/support/topic/how-to-change-tags-order/
    Another use case here:
    https://buddypress.org/support/topic/how-to-get-notification-count-code/

    Hope this help !


    pjthiel
    Participant

    @pjthiel

    Thanks!

    The bp_modify_page_title() filter is exactly what I was thinking.

    I can probably come-up with the code I need to change the title only on the single member page.


    pjthiel
    Participant

    @pjthiel

    Ok … I got excited too soon. I should have been clearer with my question. While I might want to actually update the page (tab/window) title, I was actually referring to the page content itself; i.e. the title of the page.

    Basically, the content of this code that is added to every WP page:

    <header class="entry-header">
        <h1 class="entry-title" itemprop="headline">member_name</h1>
    </header>

    I want to override the standard behavior of showing the username on the single member page, instead pulling the first_name and _last_name from the wp_user table (which are required fields as part of membership registration using MemberPress).

    Is there a bp or wp action or filter to allow me to modify the standard page content “title”?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing page title for single member’ is closed to new replies.
Skip to toolbar