Skip to:
Content
Pages
Categories
Search
Top
Bottom

No Title of Each Posts and Pages


  • @mikey3d
    Participant

    @mikey3d

    There’re no title headline of posts and pages.

    Ex: Post:
    URL: mysite.com/hello-world/
    Title tag: My blog | Home
    It should be Hello world! | My blog

    Ex: Page:
    URL: mysite.com/about/
    Title tag: My blog | Home
    It should be About | My blog

    Why is that BuddyPress mess up the title?

    WordPress 3.0.1
    BuddyPress: Version 1.2.5.2
    Theme: BuddyPress Default 1.2.5.2

    Thanks, Mikey3D

Viewing 25 replies - 1 through 25 (of 27 total)

  • modemlooper
    Moderator

    @modemlooper

    I suggest you install the SEO buddypress plugin. It’s gives you control over the titles.


    @mikey3d
    Participant

    @mikey3d

    “I suggest you install the SEO buddypress plugin. It’s gives you control over the titles.”

    I knew you would say that but I don’t want plugin SEO BuddyPress. It has to be in core BuddyPress or function. WordPress does fine with titles. I don’t want to bother the contributors to do SEO title.

    How BuddyPress can miss the most important thing the title? Is there other solution?


    Builder
    Participant

    @bpuser44

    Yes it would be great if title and meta description were possible to tweak in BP just like in WP, so many options there. E.g. in WP there’s no need for All in one seo plugin in WP for adding meta description in posts because excerpt for feeds can be used in the head of a theme. If it’s not in the BP core, who knows what a plugin developer will do tomorrow, upgrade the plugin or not it’s entirely up to them. The “SEO buddypress plugin” wasn’t upgraded a while back and it didn’t work 100%, people needed to use it together with the WP plugin so the installation worked also with pages in this title/description sense. I think if this was only a little more friendlier in BP it would become such a huge help. Maybe all this is in the BP code and can be simply placed in the head of any BP theme file like in WP installations (I wouldn’t be surprised if it was already there if the plugin exists) … but where to look? This is the major why I might not install in the root due to main pages and posts can not be nicely SEOed.


    Builder
    Participant

    @bpuser44

    In BP function reference list I have just found bp_group_description and bp_group_description_excerpt , maybe there is even more useful stuff (does anyone know more about this?). I’ll play with these two today.

    *Edit: Does anyone know; HOW could this be used in a function, and are there any more of such useful for adding SEO mainly in head title and meta description (for example taking first 160 characters from a first paragraph of a forum post and adding these to meta description in head template in the theme)?:
    function my_bp_title_tag( $title )


    @mikey3d
    Participant

    @mikey3d

    Every new posts and pages are going to be exactly the same titles. If you have hundreds or millions pages it will look like this “My blog | Home” in every search engines, bookmarks and browsers…

    Why?


    Builder
    Participant

    @bpuser44


    @mikey3d
    Participant

    @mikey3d

    When I have installed WordPress 3.0.1 and I clicked the “Hello world!” post and the title tag is fine like…

    Hello world! | My blog

    When I have installed BuddyPress 1.2.5.2 and I clicked the “Hello world!” post and the title tag is WRONG like…

    My blog | Home

    Who is the responsible the core of BuddyPress title tag that has no headlines every posts and pages? Did Matt Mullenweg know that your BuddyPress altered the title tags of WordPress?


    @mikey3d
    Participant

    @mikey3d

    Please, I need to get this done now.


    @mikey3d
    Participant

    @mikey3d

    I have been waiting 24hrs to get this sort out.


    Roger Coathup
    Participant

    @rogercoathup

    You should have signed up for the 24 hour priority support plan – drop @apeatling a line and ask him to upgrade you.

    You can change the structure of the page title by implementing your own version of the function: bp_page_title(), or by implementing a filter on bp_page_title. ( You’ll find these functions in bp-core-templatetags.php)

    Put your modified function (or filter) in your bp_custom.php file

    If you go the modified function route, remember to update your header.php in your bespoke theme to call the modified function instead of the core bp_page_title().

    You might also want to suggest a change request for a future version of BuddyPress to output title in a more SEO friendly way by default.

    If you have any problems with filters, bp_custom.php, or writing your own bespoke theme, you will find plenty of support threads in these forums


    @mikey3d
    Participant

    @mikey3d

    Thanks for helping, Roger,

    What is the code for bp_custom.php file or function.php file that will works as WordPress title?

    WordPress title for “Hello world!” is…

    Hello world! | My blog

    BuddyPress title for “Hello world!” is…

    My blog | Home

    How could anyone possible use BuddyPress plugin for WordPress without having a headline for title of each their own posts and pages? What is so wrong about this simple problem?


    @mikey3d
    Participant

    @mikey3d

    Would you be happy that I use BuddyPress without headline title posts and pages? It’s after midnight, I’m going to bed. Who knows what will tomorrow bring.


    Roger Coathup
    Participant

    @rogercoathup

    Have a look at the bp_page_title() function I pointed you to in bp_core_templatetags.php.

    That shows how the title string is built – you’ll have to rework that code in your own function (in bp-custom.php) to build the string in the order you want it.


    @mikey3d
    Participant

    @mikey3d

    I put the code in bp-custom.php from between line 896 to 950 in bp_core_templatetags.php and I get an error…

    Fatal error: Cannot redeclare bp_page_title() (previously declared in /path-to/wp-content/plugins/bp-custom.php:3) in /path-to/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 898.

    Here’s the code I put in bp_custum.php:

    function bp_page_title() {

    //CUSTOM CODE FROM BP_CORE_TEMPLATETAGS,PHP
    //between line 893 to 948

    return apply_filters( ‘bp_page_title’, $blog_title . ‘ | ‘ . esc_attr( $title ), esc_attr( $title ) );
    }

    How would I code what I want but the default one doesn’t work to begin itself with no headline title of posts and pages?

    Thanks for helping, Mikey3D


    Roger Coathup
    Participant

    @rogercoathup

    You’ll have to give your function a different name, e.g. mikey_page_title(), and change the call in header.php (in your child theme) to call mikey_page_title() instead of bp_page_title.

    If you are not using your own child theme, you will have to use the filter approach, or edit the parent theme (which will lead to upgrade problems in the future)


    @mikey3d
    Participant

    @mikey3d

    OK, I did change from bp to mikey like…

    //


    function mikey_page_title() {
    echo mikey_get_page_title();
    }

    function mikey_get_page_title() {

    /////

    return apply_filters( ‘mikey_page_title’, $blog_title . ‘ | ‘ . esc_attr( $title ), esc_attr( $title ) );
    //



    And I did change the header.php of title tags:

    mikey_page_title()

    Its works! OK, but where and what is the code for headline posts and pages?

    Thanks, Mikey3D


    Roger Coathup
    Participant

    @rogercoathup

    I don’t know what you mean by “headline post and pages”? You’ll have to explain further.

    Do you mean meta title = “..” ? In which case, I recommend installing “all in one seo” in your blog.

    If you mean the h1, h2 tags, etc. on a page … then that will all be in your theme’s template files (header.php, single.php, page.php)


    @mikey3d
    Participant

    @mikey3d

    I’m glad you did ask. That is where bottom line is the whole point of this discussion. Anyone who installs BuddyPress will have no headline in their title tags of each post and page. Ex:

    The post is “Hello world!”
    The title tag is “My blog | Home”
    The headline is “Hello world!”
    The title tag with headline is supposed to be “Hello world! | My blog”

    The page is “About”
    The title tag is “My blog | Home”
    The headline is “About”
    The title tag with headline is supposed to be “About | My blog”

    The BuddyPress’s title tags are so very wrong with its. I can’t believe no one knows about it.

    I have not mention about Meta title and h1, h2 tags. Only about title tags.

    Thanks, Mikey3D


    Roger Coathup
    Participant

    @rogercoathup

    Your terminology is what’s confusing people – when you say “headline” you actually mean the title of the post.

    In my default installation, posts are working correctly: posts like “Hello World” – they are getting the title of the post added to the title tag (albeit at the end of the string)

    You are right about pages though: pages such as About are not getting the correct title tag set.

    I’ll report this as a separate thread.


    @mikey3d
    Participant

    @mikey3d

    In my default installation, the post is working correctly: posts like “Hello World” BUT they are NOT getting the title of the post added to the title tag (albeit at the end of the string)

    Look at this URL: [Edit]

    I see the title tag is “My blog | Home” – what do you see?

    “You are right about pages though: pages such as About are not getting the correct title tag set.

    I’ll report this as a separate thread.”

    Thank God! I hope you get this. I think you are using wpmu, I use wordpress.

    Thanks, Mikey3D


    Roger Coathup
    Participant

    @rogercoathup

    I’m on WordPress 3.0.1 single site install

    Don’t just cut and paste my comment and edit in the word “NOT” – it will confuse people.

    On my default installation post titles DO work correctly, but page titles don’t work.

    If they don’t work on your installation, please make this clear in your reply. I’ll have to leave you to figure out why that is giving a problem on your install, or someone else to step in with thoughts.

    I’ve posted the page title problem separately.


    intimez
    Participant

    @intimez

    If problem is same as this one, try the patch

    https://trac.buddypress.org/ticket/2548

    Use the same login as buddypress and post your result


    @mikey3d
    Participant

    @mikey3d

    “Don’t just cut and paste my comment and edit in the word “NOT” – it will confuse people.”

    Not true, I edit words “the post”, “BUT” and “NOT.”

    I’m sorry that you thought it will confuse people. I didn’t cut and paste your comment so therefore I altered your comment to my comment without quote. The quote means it’s your comment. Without quote it means my comment.

    “On my default installation post titles DO work correctly, but page title don’t work.”

    My post titles DO NOT work correctly. The post title is “My blog | Home”

    My page title DO NOT work correctly. The page title is “My blog | Home”

    “If they don’t work on your installation, please make this clear in your reply. I’ll have to leave you to figure out why that is giving a problem on your install, or someone else to step in with thoughts.”

    There is no problem in my installation. The WordPress is fine and after install BuddyPress is fine too but the title tag is incorrectly. So that means it is BuddyPress problem. You just admitted:

    “You are right about pages though: pages such as About are not getting the correct title tag set. I’ll report this as a separate thread.”

    I use:

    WordPress 3.0.1
    BuddyPress: Version 1.2.5.2
    Theme: BuddyPress Default 1.2.5.2

    Thanks, Mikey3D

    PS: There is some confusing with words “post title” and “page title.”

    My thought of “post title” is after you click the headline link on the FrontPage to see the page and the title tag is the post title tag.

    My thought of “page title” is after you click the “About” navigation link to see the page and the title tag is the page title tag because it‘s a static page.

    I’m not talking about H1, H2 for title.


    Roger Coathup
    Participant

    @rogercoathup

    @intimez:

    yes, that’s the same problem as I’m experiencing:

    … the !bp_current_component() clause in the if statement in bp_page_title() is what’s causing the problem for sub-page titles.

    I’ve identified that in another thread: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/sub-pages-e-g-about-are-not-getting-the-correct-title-tag-set/

    But, hadn’t seen your entry in the trac.


    @mikey3d
    Participant

    @mikey3d

    Thank you for stick with me. Roger.

    It works! OK, now I’m trying to reverse the title tag after go to see the pages.

    In bp-custom.php, the code:

    if ( is_single() ) {
    $title = __( ‘Blog | ‘ . $post->post_title, ‘buddypress’ );

    Change to:

    if ( is_single() ) {
    $title = __( $post->post_title, ‘buddypress’ );

    This result I get for title tag: My blog | Hello world!

    I want to reverse the title like: Hello world! | My blog

    How could I do that?

    Thanks, Mikey3D

Viewing 25 replies - 1 through 25 (of 27 total)
  • The topic ‘No Title of Each Posts and Pages’ is closed to new replies.
Skip to toolbar