Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Change doctitle / title « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Change doctitle / title

(1 post)
  • Started 5 years ago by ahoereth
  • This topic is not resolved
  1. ahoereth
    Member

    I want to filter the thematic_doctitle function so that all titles are displayed like "Blogtitle | Pagetitle".

    
    function test_doctitle() {
    	$site_name = get_bloginfo('name');
        $separator = '$bull;';
    
        if ( is_single() ) {
    		$title = $site_name . $seperator . single_post_title('', FALSE);
        }
    	elseif ( is_home() || is_front_page() ) {
    		$title = $site_name . $seperator . get_bloginfo('description');
        }
        elseif ( is_page() ) {
    		$title = $site_name . $seperator . single_post_title('', FALSE);
        }
        elseif ( is_search() ) {
    		$search_results = __('Search Results for:', 'thematic');
    		$search_results .= ' ' . wp_specialchars(stripslashes(get_search_query()), true);
    		$title = $site_name . $seperator . $search_results;
        }
        elseif ( is_category() ) {
    		$category = __('Category Archives:', 'thematic');
    		$category .= ' ' . single_cat_title("", false);;
    		$title = $site_name . $seperator . $category;
        }
        elseif ( is_tag() ) {
    		$tag = __('Tag Archives:', 'thematic');
    		$tag .= ' ' . thematic_tag_query();
    		$title = $site_name . $seperator . $tag;
        }
        elseif ( is_404() ) {
    		$error = __('Not Found', 'thematic');
    		$title = $site_name . $seperator . $error;
        }
        else {
    		$title = $site_name . $seperator . get_bloginfo('description');
        }
    
    	$title = "\t" . "<title>" . $title . "</title>" . "\n\n";
    
        echo apply_filters( 'test_doctitle', $title );
    }
    add_filter('thematic_doctitle','test_doctitle');
    

    Whats wrong? :-/

    Posted 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183