Skip to:

Header title tag for wp & buddypress pages

  • mistercyril



    I was wondering what the title tag should look like for a site running essentially on wordpress posts and pages with buddypress group, forum and member pages.

    My problem is that BuddyPress Seo doesn’t work because my header.php in my main theme file has a title tag that is pretty standard: wp_title();

    How do I get my header to call the wordpress page title or buddypress page title depending on what page the user is on? I’m guessing an “if” statement but I don’t have a clue as of how to write this…

    Any help would be great ;-)

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

  • mistercyril


    Is no one having trouble with BuddyPress and SEO???

    I am having the same problem too but i dont know how to fix it.

    @mistercyril Don’t know exactly would it help with BP SEO – because don’t use it myself but… I suppose that using BP special tags for head section would make sense in this case. You can check them in bp-default theme.

    In particular use following tags inside the <head> tag of header.php in your theme
    <title><?php bp_page_title() ?></title> – to generate page title
    <?php do_action( 'bp_head' ) ?> – hook to add some usefull BP head routine
    <?php wp_head(); ?> – the standard WP header hook

    Ervan Erfian


    Just tried:
    add_filter( ‘wp_title’, ‘bp_get_page_title’, 10, 2 );
    in your functions.php

    Hope this help..

    Gunjan Jaswal


    Thanks a lot ervanerfian

    adding add_filter( ‘wp_title’, ‘bp_get_page_title’, 10, 2 ); to functions.php worked for me :)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Header title tag for wp & buddypress pages’ is closed to new replies.
Skip to toolbar