It gave me this error:
Fatal error: [] operator not supported for strings in /home/prayer81/public_html/my-plugins/titlemodifier.php on line 13
So I took out [] and it works like a charm. Sweetness! Big thanks! I guess this is like my first attempt at a plugin. ;o)
Do you know what I did wrong? When I try to activate the plugin I get:
Plugin could not be activated; it produced a Fatal Error.
I want to get rid of the site title that comes after the topic title on topic pages. That way I’ll only have the <title>Topic Title</title> in the browser. I need some expert coder help. :o) This is what I have that did not work:
<?php
/*
Plugin Name: Title Modifier
Author: Matt George
*/
add_filter(‘bb_title’, ‘titlemodify’);
function titlemodify( $title ) {
//your code that does something to $title;
case ‘topic-page’:
$title[] = get_topic_title();
return $title;
}
?>
Adding only
Options +MultiViews
in my .htaccess in the root of my directory where I installed bbpress did the trick. It was like magic!