Searching for WordPress Theme Standard! Here is the things to follow in WordPress Theme

Looking for WordPress Theme Standard! Here is the things to follow in WordPress Theme

# style.css

  • In WordPress Theme name not utilize watchword like ‘WordPress’, ‘Theme’.
  • Text space must be specified. Illustration: Text Domain: ‘Dexter’
  • Theme URI and Author URI are discretionary. In the event that utilized Theme URI interface with the page of topic data and Author URI connect with the creator individual site or venture improvement site. Abstain from utilizing ‘wordpress.org’ as Theme or Author URI.
  • License and License URI must be included.
  • Version of subject ought to be mentioned.
  • Theme Tags ought to be written.
  • Only three subject labels are allowed.(Example: Blog, Portfolio, Corporate)

# License

  • Always give careful consideration and ensure that the whole subject is GPL, or GPL-Compatible. This will incorporate, textual styles, contents, pictures etc.
  • Check every single given connection for GPL permit and beyond any doubt all said URL’s are GPL compatible.
  • External segments without GPL permit are not allowed.

# Security and Privacy

  • Don’t telephone home without educated client consent.
  • Make any accumulation of client information “select in” just and have a topic choice that is set to impaired by default.

# Sanitization and Validation

  • Sanitize each topic alternatives utilized as a part of the topic. You ought to dependably escape subject choices while output.
  • Escaping URL for guaranteeing no extra messages & characters are there. Illustration: ‘esc_url( home_url( ‘/’ ) );’
  • Escaping HTML for guaranteeing no extra messages & characters are there. Illustration: ‘esc_html( ‘A link‘);”
  • Escaping content territory & quality for guaranteeing no extra messages & characters are there. Illustration: ‘esc_textarea( $text );’
  • Escaping URL for picture source. Case: ‘esc_url( $image );’

#Content Creation

  • Content Creation like Text region are not permitted on Customizer or Widgets.

# Theme Options

  • Settings API isn’t permitted on subject for Theme Options. Utilize Customizer API to execute subject options.
  • Only one subpage is permitted under Appearance menu. Also, that ought to contain significant data about subject like documentation, client manage, etc.

# Language

  • Can utilize any dialect for content, yet just utilize a similar one for all text.
  • Themes are required to use as string as the content space in interpretation functions.
  • Theme must be interpretation prepared. All string should be decipher capable. Example: ‘Category:’ it’s interpretation prepared is ‘_e( ‘Class: ‘, ‘textdomain’ ); ‘
  • Text space must be specified on ‘style.css’. It must match with the topic name. On the off chance that topic name is “Dexter” its content space is ‘Dexter’.
  • ‘.pot’ must be inside the dialects organizer and name must be ‘textdomain.pot’.
  • Languages must be stack on topic record by ‘load_theme_textdomain(‘textdomain’, get_template_directory() . ‘/languages’);’

# Readme

  • Make beyond any doubt ‘readme.txt’ in is the topic root directory.
  • If other record likes ‘readme.md’,’theme-info.txt’ found on subject index, prescribed to use ‘readme.txt’ demand to evacuate other files.
  • ‘readme.txt’ must contain subject data, permit information, changelog , short topic portrayal and so on

# Screenshot

  • No logo or deride up, ought to be of genuine subject it appears.
  • Size no greater than 1200*900px. Any 4:3 picture measure is accepted.

# Changelog.txt

  • If changelog isn’t kept up on ‘readme.txt’ it must kept up under the ‘changelog.txt’.

# Favicon

  • This is currently center usefulness, new subject ought not include this feature.

# Site Logo

  • If logo highlight is actualized, Logo must be alterable and be handicapped by default.

# Plugins

  • No modules are not permitted to package in the subject, but rather topic can suggest modules and those modules must be in dab organization store. Topic should work great with no plugin.

# Post Type

  • Custom Post writes and scientific categorizations are not allowed.

# Shortcode

  • Shortcodes are not allowed on theme.

# Style and Scripts

  • Theme must have ‘style.css’.
  • No hard coding of style and contents are permitted. Style and Scripts must should be enqueued.
  • Use ‘get_template_directory_uri()’ rather of ‘get_stylesheet_directory_uri()’.
  • No minification of style or contents documents are permitted unless unique records are provided.
  • If Google textual style is utilized, it ought to be enqueued. No other CDN urls are allowed.
  • Default Scripts Included and Registered by WordPress itself. No compelling reason to enqueue, as ‘jquery.js, masonry.js’ etc
  • Use conditions on contents to lessen conflicts.

# header.php

  • Proper DOCTYPE is needed.
  • The opening ‘‘ tag ought to incorporate ‘language_attribute’.
  • Use ‘bloginfo()’ to set the ‘‘ charset and portrayal element.
  • Add a call to ‘wp_head()’ before the end ‘‘ tag. Modules utilize this activity snare to include their own particular contents, templates, and other functionality.
  • ‘body_class()’must be inside the opening body tag.
  • Do not interface the subject templates in the Header layout. Utilize the ‘wp_enqueue_scripts’ activity snare in a subject capacity instead.

# footer.php

  • Use the ‘wp_footer()’ call, to seem just before shutting body tag.
  • Don’t utilize incorporate Javascript or jQuery in subject footer.

# Customizer API

  • ‘capability’ ought to be ‘edit_theme_options’ while utilizing Customizer API for subject options.
  • ‘sanitize_callback’ is fundamental for cleaning customizer fields. For instance: Sanitizing URL ‘sanitize_callback’ => ‘esc_url_raw’
  • Sanitizing Email ‘sanitize_callback’ => ‘sanitize_email’ etc.

# Code

  • add_theme_support( ‘title-tag’ ); must be incorporated on functions.php. Title tag isn’t permitted in ‘header.php’.
  • If there is wp_title(‘|’); ‘ discovered then it isn’t permitted in light of the fact that title label as of now defined.
  • Prefix topic capacities, classes, worldwide factors, picture measure name, content and style handles, and so forth with the subject slug.

Case:

function textdomain_footer_copyright { 

/code goes here 

}
  • In a subject must be no any PHP blunder & warning, Javascript’s support mistake. Need to settle them.
  • WordPress expostulated capacities are not permitted. Need to settle them.
  • Functions like ‘the_archive_title’ and ‘the_archive_description’ are currently accessible in WordPress center. What’s more, accordingly, we don’t need to keep the regressive similarity for more than last two noteworthy variants. They should not be characterized. For the most part they are characterized in ‘format tags.php’.

# Others

  • W and P of WordPress dependably in uppercase.
  • Remove superfluous remarked code. On the off chance that any document or envelope isn’t being utilized, it ought to be removed.
  • It isn’t important to give in reverse similarity all the more then two noteworthy versions.
  • No customization in WordPress admin.
  • Redirection isn’t permitted after topic activated.
  • Custom CSS field isn’t permitted. It’s presently center usefulness. (Since WordPress 4.7)
  • It’s not permitted to evacuate the default usefulness of core.

For more detail observe handbook here…

  1. Mithun raval

    it’s was a really nice blog for theme standard and very useful to the theme developer. Looking forward to anther….:)

  2. andres william

    Thanks for the WordPress Theme Standards Afzal Multani i Liked it!

  3. Mansi Trivedi

    Blog with really reach content. Very helpful blog. 🙂

  4. I was reviewing a theme and was looking for a nice resource. I must say I got A to Z things in single page. Thanks a lot to save my time!

  5. Jamal

    Pretty! This has been a really wonderful article.
    Thank you for providing this info.

Leave A Comment?