WordPress Theme Standard

WordPress Theme Standard

# style.css

  • Theme name must not use keyword like ‘WordPress’, ‘Theme’.
  • Text domain must be mentioned. Example: Text Domain: india
  • Theme URI and Author URI are optional. If used Theme URI link with the page of theme information and Author URI link with the author personal site or project development site. Avoid using ‘wordpress.org’ as Theme or Author URI.
  • License and License URI must be included.
  • Version of theme should be mentioned.
  • Theme Tags should be written.
  • Only three subject tags are allowed.(Example: Blog, Portfolio, Corporate)

# License

  • Always pay extra attention and make sure that the entire theme is GPL, or GPL-Compatible. This will include, fonts, scripts, images etc.
  • Check all given links for GPL license and sure all mentioned URL’s are GPL compatible.
  • External components without GPL license are not allowed.

# Security and Privacy

  • Don’t phone home without informed user consent.
  • Make any collection of user data “opt-in” only and have a theme option that is set to disabled by default.

# Sanitization and Validation

  • Sanitize every theme options used in the theme. You should always escape theme options while output.
  • Escaping URL for ensuring no additional texts & characters are there. Example: <a href=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>Home</a>
  • Escaping HTML for ensuring no additional texts & characters are there. Example: $html = esc_html( ‘<a href=”http://www.example.com/”>A link</a>’ );
  • Escaping text area & attribute for ensuring no additional texts & characters are there. Example: <?php esc_textarea( $text ); ?>
  • Escaping URL for image source. Example: <img src=”<?php echo esc_url( $image ); ?>

#Content Creation

  • Content Creation like Text area are not allowed on Customizer or Widgets.

# Theme Options

  • Settings API is not allowed on theme for Theme Options. Use Customizer API to implement theme options.
  • Only one subpage is allowed under Appearance menu. And that should contain relevant information about theme like documentation, user guide, etc.

# Language

  • Can use any language for text, but only use the same one for all text.
  • Themes are required to use as string as the text domain in translation functions.
  • Theme must be translation ready. All string need to be translate able. Example: ‘Category:’ it’s translation ready is <?php _e( ‘Category: ‘, ‘textdomain’ ); ?>
  • Text domain must be mentioned on ‘style.css’. It must match with the theme name. If theme name is “My India” its text domain is ‘my-india’.
  • ‘.pot’ must be inside the languages folder and name must be ‘textdomain.pot’.
  • Languages must be load on theme file by ‘load_theme_textdomain(‘textdomain’, get_template_directory() . ‘/languages’);’

# Readme

  • Make sure ‘readme.txt’ in is theme root directory.
  • If other file like ‘readme.md’,’theme-info.txt’ found on theme directory, recommended to use ‘readme.txt’ request to remove other files.
  • ‘readme.txt’ must contain theme info, license info, changelog , short theme description etc.

# Screenshot

  • No logo or mock up, should be of actual theme it appears.
  • Size no bigger than 1200*900px. Any 4:3 image size is accepted.

# Changelog.txt

  • If changelog is not maintained on ‘readme.txt’ it must maintained under the ‘changelog.txt’.

# Favicon

  • This is now core functionality, new theme should not add this feature.

# Site Logo

  • If logo feature is implemented, Logo must be changeable and be disabled by default.

# Plugins

  • No plugins are not allowed to bundle in the theme, but theme can recommend plugins and those plugins must be in dot org repository. Theme should work good without any plugin.

# Post Type

  • Custom Post types and taxonomies are not allowed.

# Shortcode

  • No shortcodes are allowed on theme.

# Style and Scripts

  • Theme must have ‘style.css’.
  • No hard coding of style and scripts are allowed. Style and Scripts need to be enqueued.
  • Use ‘get_template_directory_uri()’ instead of ‘get_stylesheet_directory_uri()’.
  • No minification of style or scripts files are allowed unless original files are provided.
  • If Google font is used, it should be enqueued. No other CDN urls are allowed.
  • Default Scripts Included and Registered by WordPress itself. No need to enqueue, like ‘jquery.js, masonry.js’ etc
  • Use dependencies on scripts to reduce conflicts.

# header.php

  • Proper DOCTYPE is needed.
  • The opening ‘<html>’ tag should include ‘language_attribute’.
  • Use ‘bloginfo()’ to set the ‘<meta>’ charset and description element.
  • Add a call to ‘wp_head()’ before the closing ‘</head>’ tag. Plugins use this action hook to add their own scripts, stylesheets, and other functionality.
  • ‘body_class()’must be inside the opening body tag.

Example: <body <?php body_class(); ?> >

  • Do not link the theme stylesheets in the Header template. Use the ‘wp_enqueue_scripts’ action hook in a theme function instead.

# footer.php

  • Use the ‘wp_footer()’ call, to appear just before closing body tag.

# Customizer API

  • ‘capability’ should be ‘edit_theme_options’ while using Customizer API for theme options.
  • ‘sanitize_callback’ is necessary for sanitizing customizer fields. For example: Sanitizing URL ‘sanitize_callback’ => ‘esc_url_raw’
  • Sanitizing Email ‘sanitize_callback’ => ‘sanitize_email’ etc.

# Code

  • add_theme_support( ‘title-tag’ ); must be included on functions.php. Title tag is not allowed in ‘header.php’. If <title><?php wp_title(‘|’); ?></title> found, it is not allowed because title tag already defined.
  • Prefix theme functions, classes, global variables, image size name, script and style handles, etc with the theme slug.

Example:

‘function textdomain_footer_copyright{

//code goes here

}’

  • No any PHP error & warning, Javascript’s console error, WordPress deprecated errors are allowed. Need to fix them.
  • Functions like ‘the_archive_title’ and ‘the_archive_description’ are now available in WordPress core. And thus, we don’t have to keep the backward compatibility for more than last two major versions. They must not be defined. Mostly they are defined in ‘template-tags.php’.

# Others

  • W and P of WordPress always in uppercase.
  • Remove out unnecessary commented code. If any file or folder is not being used, it should be removed.
  • It is not necessary to provide backward compatibility more the two major versions.
  • No customization in WordPress admin.
  • Redirection is not allowed after theme activated.
  • Custom CSS field is not allowed. It’s now core functionality. (Since WordPress 4.7)
  • It’s not allowed to remove the default functionality of core.

Tools That Help In Delivery Of WordPress Websites Free Of All Errors

Testing is most important part of any project development process because only through this process you will know what customers will be facing while accessing your website. If you are not testing your online solution then you will never have any idea about the experience of customers trying to go through your website and about the future of the website.

Testing covers every part of the solution like faults in design, performance, working of functions, speed at different level, optimizations and many more. For an online solution one of the major tests would be performance of the portal on multiple browsers. According to the results of these tests you can always consult WordPress theme customization service providers and get the modifications in your design as per the requirements.
Let us see tools that help in the testing.

Before using tools the first thing you can check is whether your online store is cross-browser compatible and that you can check by yourself. All you need to do is open your store in different browsers and observe if there is any kind of glitch you find. You need to think like a customer so that you will know the actual changes that is required.

It is not always necessary to go for professional services, you can check various wordpress customization service Blogs and then try to do the customization by yourself with minimal codes.

Browser SandBox
This is free tool that will check your online solution on all versions of Google Chrome, Firefox , Safari and Internet explorer online. There is no need of installing anything and just a click will give complete results on various browsers.

Browsera
This is the right tool for those who want to know the difference between various browsers. This is also free tool that will test browsers side by side and will let you know about the differences between two browsers. If you want to have some useful information about various browsers then this is a bonus tool.

Broserling
This is the most famous testing tool among wordpress theme customization developers because this will check your online solution on all popular windows and Android browsers. So, you will know about the compatibility of your site on mobile devices. The tool is completely free and all you need to do is enter your homepage URL and rest of the work will be taken care by the tool.

Apart from these popular tools there are many more tools that help in the testing of your online portals.

Why WooCommerce Is Good For E-Commerce Business

Looking to set up an e-commerce store? Well, WooCommerce and e-commerce make a great pairing. WooCommerce is more than just another free WordPress plugin.It has an array of incredible features that makes it one of the most widely preferred platforms for setting up a good-looking and user-friendly online store.Such is its popularity that nearly one-third of online stores are powered by this one.An open-source platform, WooCommerce boasts of seamless integration with WordPress, which makes it a perfect choice for taking your business online.And there are so many other reasons for choosing this shopping cart plugin with your WordPress site:

Limitless Flexibility
WooCommerce offers the power of immense flexibility where the merchants can conveniently handle the products without technical expertise.They can sell physical, downloadable, virtual, and affiliate products on WooCommerce stores.While the core version brings a range of basic features and functionalities for free, there are premium extensions for more.With these extensions, merchants can categorize products, offer bookings, sell subscriptions, and memberships.

Appealing Interface
By opting for this platform, merchants can have an appealing interface for their online store.The default WordPress themes ensure that the store design is contemporary and adheres to current trends.It is easy to integrate WordPress content into the e-commerce store as well as make it responsive for various devices.A range of theme extensions is available for customizing the store with WooCommerce.

Developer-Friendly
WooCommerce is a platform which has been specifically created with developers in mind.They can easily customize the sites, build extensions, and apply filters too.Also, it easy for them to migrate the existing store from its current platform to WooCommerce.
It can be integrated with any service because it is built with REST API.With this platform, developers can scale the client’s store according to their requirements.

Comprehensive Features
Another reason that WooCommerce makes a perfect partner for e-commerce is that it brings comprehensive features that any online store needs to run. It has an array of pre-installed payment gateways to facilitate the payment function.The additional user-friendly features include complete control over the checkout process, built-in geolocation support for shipping function, default currency options, and automatic tax management.

Integrated SEO
Since WooCommerce runs on WordPress, it gets the benefit integrated SEO which strengthens the core marketing strategy of the store. Features such as discount codes and coupons, product reviews, wishlists, e-mailers, product bundles, reward points, and social media integration can further enhance the marketing plan.

Built-In Analytics
The platform comes with built-in analytics, which arms the merchants with the capability understand the user behavior and frame their business plans accordingly.With this powerful feature, they can track sales and growth trends as well as generate performance reports for the business.

Effective CRM
WooCommerce facilitates effective CRM which means enhanced customer satisfaction and success for the business. The platform enables the seller to control customer accounts, generate automatic passwords for them, display product variables, offer one-click refunds, and integrate third party services.

Hence, it can be said that WooCommerce makes an excellent choice for building a WordPress website for your e-commerce business.