Parent Forum Name in
-
I’m trying to get the parent forum name in the title tag.
I made a plug in that takes care of most of it…
<?php
/*
Plugin Name: Better Titles
Author: James Dixson
*/
add_filter('bb_title', 'titlemodify');
function titlemodify( $title ) {
//your code that does something to $title;
switch ( bb_get_location() ) {
case 'topic-page':
$title = get_topic_title() . ' - ' . get_forum_name() . ' — Adventure Canoe Forum' ;
break;
case 'front-page':
$title = bb_option('name') . ' — Canoeing and Paddling Discussion' ;
break;
case 'forum-page':
$find = 'Canoe';
$string = get_forum_name() ;
if(strstr($string,$find)){
$title = get_forum_name() . ' — Adventure Canoe Forum' ;
}else{
$title = 'Canoe ' . get_forum_name() . ' — Adventure Canoe Forum' ;
}
break;
}
return $title;
}
?>You can see it in action at http://www.adventurecanoe.com/forum
Now what I want to add is something that does this
Parent Forum Name — Forum Name — Forum Title
Basically if you went to the page http://www.adventurecanoe.com/forum/forum/rivers the title tag would read:
Canoeing Destinations — Rivers — Adventure Canoe Forum
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.