WordPress.org

Ready to get started?Download WordPress

Forums

Elbee Elgee
[PATCH] Title improvement (1 post)

  1. Daedalon
    Member
    Posted 1 year ago #

    The title output by header.php contained always an extra whitespace character. On the front page of the site it the HTML was <title> Blogname</title> and on article pages <title>Articlename – Blogname</title>.

    The following code removes the unwanted whitespace character and slightly improves the HTML and PHP indentation also making the latter to adhere to the WordPress Coding Standards.

    Find this code in header.php, starting from line 24:

    if ( class_exists('All_in_One_SEO_Pack') || class_exists('HeadSpace_Plugin') || class_exists('Platinum_SEO_Pack') || class_exists('wpSEO') || defined('WPSEO_VERSION') ) {
    	?>
    	<title><?php wp_title(''); ?></title>
    	<?php
    	} else {
    	?>
    	<title><?php if(is_search()) { echo "Search Results » "; } else { wp_title('»', true, 'right'); } ?> <?php bloginfo('name');?></title>
    	<meta name="description" content="<?php bloginfo('description'); ?>" />
    	<?php
    	}

    And replace it with this code:

    if ( class_exists('All_in_One_SEO_Pack') || class_exists('HeadSpace_Plugin') || class_exists('Platinum_SEO_Pack') || class_exists('wpSEO') || defined('WPSEO_VERSION') ) {
    		?>	<title><?php wp_title(''); ?></title><?php
    	} else {
    		?>	<title><?php if(is_search()) { echo "Search Results » "; } else { wp_title('»', true, 'right'); } ?><?php bloginfo('name');?></title>
    	<meta name="description" content="<?php bloginfo('description'); ?>" /><?php
    	}

    If someone could test this out also on their site, that'd be great. If no one notices any issues in a reasonable time, I'll submit this into the Elbee Elgee repository for Doug to consider adding to the next update.

    http://wordpress.org/extend/themes/elbee-elgee/

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic