WordPress Soft-Rejection Reasons

Awesome collection, thanks for sharing :slight_smile:

billyf said

This is a really nice list. I think the help center should include some of these as ‘Common WordPress Theme Soft Rejection Reasons’.

+1

This will be really nice. It will speed up whole submission process.

Great resources, thanks.

Thank you for this collection.

Thanks a lot brother . :grinning:
Very helpfull tips and Supper Post for New WP Developer . :heart:

Very helpful! saving this for later :slight_smile:

Is it a must to follow this specific structure? What is the problem in making an enqueue in a proper file when needed ? is there any known reference in Wordpress making this limitation ?

  • Also i have this soft rejection reason: The extra brackets are not needed

    require_once( get_template_directory() . ‘/inc/custom-header.php’ );

According to the WordPress handbook php standards there is nothing that limits me from opening brackets while requiring a file, is this mentioned anywhere as standard in WordPress ?

  1. .screen-reader-text css class is needed in your theme css. See See:
    the Codex for an example implementation.

  2. Translation function calls must NOT contain PHP variables.

  3. No reference to add_theme_support( “title-tag” ) was found in the
    theme. It is recommended that the theme implement this functionality
    for WordPress 4.1 and above.

  4. Include files via get_template_directory() and not with
    locate_template because you’re not loading WordPress templates and
    core is very specific when it comes what is loading

  5. There is no need to use the function wp_enqueue_script just to
    insert jQuery, since jQuery can be called for those scripts which
    need it passing the argument array(‘jquery’).

  6. Make sure all the WP default widgets display properly in all
    widgetized areas. You can check with monster widgets plugin.

  7. Page comments do not appear

  8. Favorite: Your theme is broken. http://envato.d.pr/1dUlu/2UUAvUPC

1 Like

@PremiumLayers Thanks for sharing this valuable resource with new authors :slight_smile:

Couple more

  1. All theme text strings are to be translatable and properly escaped.

2.Page comments should be enabled by default.

Just had a quick question, if you are getting these kind of soft rejections with no design issues in soft rejection message does it mean you are very nearer to get accepted?

Yes… :slight_smile:

Some more recent onces

Don’t use dirname(FILE), basename( FILE )
Must pass themecheck completely including warnings ( this now includes TGMPA )
Page builder shouldn’t be enabled by default hiding the editor ( seems to be ok its visual composer but not custom)
Pages should have comments
Default page template must have a container.
Default page must have a page title
All global variables should be within a function or class.

TGMPA, redux or any other 3rd party code must be modified to pass requirements or included as a plugin

What does this even mean?

When loading the wordpress unit test, everything should look right by default with no options applied. This means that the unit test pages content must be centered in a container so it looks right.

For me, the default template was for use with a page builder. But that meant that a page with content was full width.

I would imagine not everyone is getting this a rejection reason, it’s different per reviewer but this was a rejection reason for me.

  1. Prefix everything and use unique (theme-name-based) consistent slugs. Additional prefix is acceptable for when the author is using a framework.

Avoid using initials or abbreviations.

Here’s a list of the most common things that should be prefixed: PHP function names, PHP class names, PHP global variables, Action/Filter hooks, Script handles, Style handles and Image size names.

Please see: http://themereview.co/prefix-all-the-things/

  1. Theme needs to properly load files, but also to be consistent as well.

There are several functions available for getting the path:

  1. Always use esc_url when sanitizing URLs (in text nodes, attribute nodes or anywhere else). Reject URLs that do not have one of the provided whitelisted protocols (defaulting to http, https, ftp, ftps, mailto, news, irc, gopher, nntp, feed, and telnet), eliminates invalid characters, and removes dangerous characters. ( This looks like an internal message for the reviewer on why to reject )

https://developer.wordpress.org/reference/functions/esc_url/

Don’t forget to run Theme Check as well https://wordpress.org/plugins/theme-check/.

1 Like

Excellent collection :slight_smile: Thanks a lot!

“If no image is selected by user, nothing should display. Please remove image placeholders: http://envato.d.pr/Bs81/60U2HnPl

That is actually a css box.

Edit: I actually removed the placeholder, and the reviewer said: "Consider restyling posts without image (without adding a placeholder). As it stands leaving an empty space looks odd and breaks flow: http://envato.d.pr/uDpU "

Guess what Sherlock, we used placeholders just because of that.

2 Likes
  1. The prefix must be hardcoded: https://cloudup.com/cPXJFGQwUnw
  2. Translate all the strings and escape where needed (even it’s the text on alt="" of img element.)
  3. Don’t leave any attribute empty like alt=""
  4. Scripts and styles should not be hardcoded anywhere in your theme or added any other way but with wp_enqueue_* hook and to be added from the functions file. This includes custom JS/CSS.
    For inline styles use: https://developer.wordpress.org/reference/functions/wp_add_inline_style/ and for scripts https://developer.wordpress.org/reference/functions/wp_add_inline_script/.
    http://envato.d.pr/3X6rVT
  5. Please ensure your .POT translation file is up to date
  6. The theme needs to properly load files, but also to be consistent as well.

There are several functions available for getting the path:

  • get_template_directory - Filter the current theme directory path.

  • get_template_directory_uri - Filter the current theme directory URI.

  • get_stylesheet_directory - Filter the stylesheet directory path for the current theme.

  • get_stylesheet_directory_uri - Filter the stylesheet directory URI.

https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Themes

https://developer.wordpress.org/themes/basics/linking-theme-files-directories/#linking-to-theme-directories