Added title-tag and removed wp_title from header > fail
-
Hi,
I have added the title-tag in file functions and removed wp_title tag from file header.
Because I want to display document title in WP 4.0 and older I have also added the backwards compatibility from the codex:
if ( ! function_exists( '_wp_render_title_tag' ) ) : function mytheme_render_title() { echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n"; } add_action( 'wp_head', 'mytheme_render_title' ); endif;
And I have added the blog title to function above using this default code:
function mytheme_wp_title( $title ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); return $title; } add_filter( 'wp_title', 'mytheme_wp_title' );
Theme Check plugin AND Theme Check while submitting theme to themes directory fails:
Results of Automated Theme Scanning: Fail
REQUIRED: The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the outputI’ve read this was fixed for online Theme Check, but I think it is not.
Guido
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Added title-tag and removed wp_title from header > fail’ is closed to new replies.