Info
- 5 posts
- 4 voices
- Started 5 years ago by LordCoder
- Latest reply from Arlo
- This topic is resolved
How to customize bbpress titles ?
-
- Posted 5 years ago #
Hi all ,
i recently installed BBPress , and oh man , its very easy to use and the installation taked only 3 minutes , but its the customization that was very interesting , about this , how to customize titles ?
I dont want the whole title like this : POST_TITLE > SITE_TITLE , is that possible ?Thanks .
-
- Posted 5 years ago #
There isn't currently a filter on the title, so there's no quick answer that I can see, however:
You could copy
bb-templatesheader.phptomy-templatesheader.php(if you don't have a copy of it already), then change its call tobb_title();to another function, which you could write in a plugin, stealing code from thebb_get_title()function intemplate-functions.php.Something like:
my-title-plugin.php<?php
// edit this so it returns whatever you want
function my_title() {
global $topic, $forum, $static_title, $tag, $user;
$title = '';
if ( is_topic() )
$title = get_topic_title(). ' « ';
if ( is_forum() )
$title = get_forum_name() . ' « ';
if ( is_tag() )
$title = wp_specialchars( get_tag_name() ). ' « Tags « ';
if ( is_bb_profile() )
$title = get_user_name( $user->ID ) . ' « ';
if ( !empty($static_title) )
$title = $static_title . ' « ';
$title .= bb_get_option('name');
return $title;
}
?> -
- Posted 5 years ago #
There will be a filter for the title in the next release. Thanks!
-
- Posted 5 years ago #
Thanks for your help !
-
- Posted 5 years ago #
I'm on latest trac...is this filter present? I'm not seeing it anywhere.
-
You must log in to post.