bbPress

Simple, Fast, Elegant

bbPress support forums » Pimp your Press

Title Tags

(5 posts)

No tags yet.

  1. sclark74
    Member

    Hello. Can anyone please tell me how to customize title tags in the forums? How can I have a title tag that is different from the name of the forum?

    I looked around for this info, but was unable to find it.

    Thanks!

    Posted 1 year ago #
  2. What do you mean by title tag? I don't understand. Do you mean the text that appears next to the bb icon at the top of the page?

    Posted 1 year ago #
  3. sclark74
    Member

    Sorry if Im not being clear enough - Im a newbie. I mean the text that shows up in the browsers title bar: <title></title>. When I enter a name for a forum in the Forum Managment Inteface, that name appears in the title tag, however I want the title tag to contain more text than the forum name.

    Posted 1 year ago #
  4. Oh, sorry. Yeah. I getchoo. Yes. The filter you want to use is bb_title. The way filters work is that you tell bbpress what you want to filter, bbpress gives you the input and you return the output. In this case:

    <?php
    /*
    Plugin Name: Title Modifier
    Author: You
    */
    add_filter('bb_title', 'titlemodify');
    
    function titlemodify( $title ) {
    //your code that does something to $title;
    return $title;
    }
    ?>

    Paste this into an empty text file, save it as whateveryouwant.php, edit the code so it actually does something with $title, then upload and activate.

    Posted 1 year ago #
  5. sclark74
    Member

    Awesome - I will let you know how it goes. Thanks!

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.