Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of hnla

bp_page_title() doesn’t return correct title (9 posts)

Started 1 year, 7 months ago by: Tom(dB)

  • Profile picture of Tom(dB) Tom(dB) said 1 year, 7 months ago:

    I’ve noticed that on a multisite installation on every blog, except the primary blog, the title of the page is not set properly, it just uses “Sitename | Home” even when not on the front page.

    I’ve been testing with bp_is_blog_page(), is_single(), is_category(), etc. and they all know where they are when used within the templates, but not when the bp_page_title() function is called.

    I have set BP_ENABLE_MULTIBLOG to true. This happens on both the default theme and a child theme I’m working on. Anyone experiencing the same?

  • Profile picture of Tom(dB) Tom(dB) said 1 year, 6 months ago:

    Anyone, Bueller?

  • Profile picture of Alexander Alexander said 1 year, 6 months ago:

    @tomdebruin: I’m experiencing the same as you. All my pages/posts that are generated by WordPress have the default blog title in the . Have you filed a bug for this?

  • Profile picture of Boone Gorges Boone Gorges said 1 year, 6 months ago:

    Yeah, sounds like a bug. BP_ENABLE_MULTIBLOG implementation is a little incomplete at the moment. trac.buddypress.org with the same login credentials

  • Profile picture of Alexander Alexander said 1 year, 6 months ago:

    @boonebgorges: I have filed a bug (because I’m impatient) :)

  • Profile picture of Tom(dB) Tom(dB) said 1 year, 6 months ago:

    @Alexander, I spoke to @DJPaul at WordCamp UK who said he’d look into it, and also that I should file a bug report. Which I hadn’t got round to, so thanks for filing it.

  • Profile picture of Paul Gibbs Paul Gibbs said 1 year, 6 months ago:

    Hi Tom
    Yeah, I saw that come through. I’ll look as soon as I can.

  • Profile picture of Jon Jon said 1 year, 6 months ago:

    I think the problem is on bp-core-templatetags.php around line 946.

    if ( defined( ‘BP_ENABLE_MULTIBLOG’ ) ) {
    $blog_title = get_blog_option( $current_blog->blog_id, ‘blogname’ );
    } else {
    $blog_title = get_blog_option( BP_ROOT_BLOG, ‘blogname’ );
    // next 3 lines added
    if ( is_page() ){
    $title = $post->post_title;
    }
    }
    Returns the page title a bit more correctly.
    PS Blame the lack of formatting on the post – it all looked nice before I posted it!

  • Profile picture of Alexander Alexander said 1 year, 6 months ago:

    @jonacb: Is this a solution? Would you please paste it in a pastebin and say which line or function we should replace with this.