• Resolved misharnet

    (@misharnet)


    I am creating my first WP Theme and I would like to upload it to www.ads-software.com. That’s why I use, as recommended, Theme Check Plugin.

    I resolved other issues, except these two.
    1. REQUIRED: The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output

    I understand that is related to title tag in header.php, am I wrong?
    This is my header:

    <!doctype html>
    <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
    <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?>> <![endif]-->
    <!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>> <![endif]-->
    <!--[if IE 8]>    <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
    <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
    <!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
    
    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>" />
    	<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
    	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title><?php wp_title( '|', true, 'right' ); ?></title>
    	<meta http-equiv="cleartype" content="on">
    
    	<!-- Responsive and mobile friendly stuff -->
    	<meta name="HandheldFriendly" content="True">
    	<meta name="MobileOptimized" content="320">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
    
    	<link rel="profile" href="https://gmpg.org/xfn/11" />
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    
    	<?php wp_head(); ?>
    </head>

    What is wrong with it?

    2. REQUIRED: screen_icon() found in the file class-tgm-plugin-activation.php. Deprecated since version 3.8.

    Line 381: screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) );
    
    Line 1584: screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) );

    I understand that, but I don’t know with what should I replace it?

    I am really greatfull for your potential answers.

Viewing 31 replies (of 31 total)
  • Hi,

    If you are using a theme based on “underscores” theme, when you trying to check your theme using “Theme-Check” plugin you will see this message:

    The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output

    To fix this problem go to inc/extras.php file and find this:

    if ( ! function_exists( '_wp_render_title_tag' ) ) :
    	/**
    	 * Title shim for sites older than WordPress 4.1.
    	 *
    	 * @link https://make.www.ads-software.com/core/2014/10/29/title-tags-in-4-1/
    	 * @todo Remove this function when WordPress 4.3 is released.
    	 */
    	function themeslug_render_title() {
    		echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n";
    	}
    	add_action( 'wp_head', 'themeslug_render_title' );
    endif;

    Replace it with:

    if ( ! function_exists( '_wp_render_title_tag' ) ) :
        function themeslug_render_title() {
    ?>
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <?php
        }
        add_action( 'wp_head', 'themeslug_render_title' );
    endif;
Viewing 31 replies (of 31 total)
  • The topic ‘Theme Check problem’ is closed to new replies.