Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sub pages, e.g. About, are not getting the correct title tag set


  • Roger Coathup
    Participant

    @rogercoathup

    The title tag (displayed in the browser bar) is not getting set correctly for sub pages.

    e.g. if you click on the About page, the title bar says: site-name | Home (instead of the correct site-name | About)

    I set up a test site, WP 3.0.1, automatic BP 1.2.5.2 installation, to check this problem for another user.

    You can see the problem at: http://playground.21inspired.com/about/

    Any thoughts?

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

  • Roger Coathup
    Participant

    @rogercoathup

    Investigating further, the function bp_get_page_title() is not returning the correct result for sub pages:

    This if at the start of the function is returning true for all pages not just the home page:

    if ( is_front_page() || !bp_current_component() || ( is_home() && bp_is_page( ‘home’ ) ) ) {
    $title = __( ‘Home’, ‘buddypress’ ) ;

    Anyone got ideas?

    @johnjamesjacoby – does this need adding as a fix in the trac?


    Roger Coathup
    Participant

    @rogercoathup

    The problem is because !bp_current_component() is returning true for all pages, so all pages are getting the title set as ‘Home’


    Roger Coathup
    Participant

    @rogercoathup

    As pointed out by @intimez, this is already in the trac with a fix: https://trac.buddypress.org/ticket/2548

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sub pages, e.g. About, are not getting the correct title tag set’ is closed to new replies.
Skip to toolbar