• Reading thru the handbook I found about the plugins Theme Check and Theme Sniffer. Looks like I have some problems, but then I do not know PHP except for editing the code in _s. I’m getting these errors from Theme Check:

    REQUIRED: Could not find comments_template. See: comments_template <?php comments_template( $file, $separate_comments ); ?>

    RECOMMENDED: No reference to add_theme_support( “custom-header“, $args ) was found in the theme.

    RECOMMENDED: No reference to add_theme_support( “custom-background“, $args ) was found in the theme

    INFO: Possible hard-coded links were found in the file footer.php
    INFO: Only one text-domain is being used in this theme. Make sure it matches the theme’s slug correctly so that the theme will be compatible with ww.wp.xz.cn language packs

    1. Let me preface this by saying that I am just trying to create a theme for myself, not to upload it to the repository. I do not want any pages or posts that support comments so I removed that from all of my template files. Why do I have to add comments_template?
    2. I’m doing all of the CSS for my site so I do not want custom header or custom background options in my theme. I commented out the following to hope the errors would go away but they didn’t:

    add_theme_support(
    	'custom-background',
    	apply_filters(
    		'tower_custom_background_args',
    		array(
    			'default-color' => 'ffffff',
    			'default-image' => '',
    		)
    	)
    );

    require get_template_directory() . '/inc/custom-header.php';

    Should I ignore those “RECOMMENDED” lines?

    And finally, here is the footer code that came when I downloaded _s though i/ did change the URL:

    <?php
    printf( esc_html__( '&copy; 2020 - Theme Name: %1$s by %2$s.', 'tower' ), 'tower', '<a href="https://kernixwebdesign.com/">James Kernicky</a>' );
    ?>

    Why would I get an “INFO” error if that is what _s included? Also, how do I make the copyright date dynamic? I did get something to do that with variable but then I got more errors.

    Sorry for all the questions but I’m starting to get overwhelmed. A link to a blog post covering the plugin and errors would be great.

    • This topic was modified 5 years, 4 months ago by Jim.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Pop into the #THEMEREVIEW channnel on slack. https://make.ww.wp.xz.cn/chat/

    Thread Starter Jim

    (@kernix)

    I’m not sure what that is but I clicked the join link – just waiting for the email but I have to run…

    Moderator bcworkz

    (@bcworkz)

    If your theme is not destined for the repository, outside of outright errors that prevent the theme from loading, you don’t really have to do anything asked for by Theme Check. It’s still a good tool for flagging items you may have missed, but you can choose to ignore recommendations if you like.

    Slack is a business oriented replacement for public chatroom channels. If you don’t see the Slack email when you get back, check your spam folder. The various channels for WordPress in Slack are for all the various teams which focus on one aspect of WP or another. Of course we think #forums is the best channel 🙂 It’s mainly for mods and administrators to coordinate management of the forums, but anyone interested is welcome.

    Thread Starter Jim

    (@kernix)

    Ok, I’ll check it out. Should I only post there about some of the theme issues I have? Because the errors from Theme Sniffer are many. I just need a source to read up on some of these things like the footer code that uses what I think are referred to as translators, e.g. %1$s.

    As for theme check, then I’ll ignore them for now though I would like to get as much ‘right’ as possible.

    Moderator bcworkz

    (@bcworkz)

    The Slack channels are not normally for support questions, but if you have a quick question about the theme review tools, that team is in the best position to answer. For specific software issues, I’d expect the tools to be maintained on github, where you can raise issues and they can be properly tracked. The theme review team can direct you to the right place if you cannot find it in any docs for the tools.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Need some guidance for errors found using Theme Check plugin’ is closed to new replies.