Board logo

subject: How To Resolve All Compatibility Issues With Your Wordpress Theme [print this page]


The market is flooded with information about WordPress and advises on why and how it is the best content management system currently available. Going by the hype, it is but natural for anyone to want to use WordPress for running any kind of website. Though WordPress is indeed a very safe and trusted content management system, very often users tend to trust it blindly which is one of the biggest mistake anyone can make. One has to be especially careful while installing third-party themes. It is essential that the compatibility of the theme is thoroughly checked to have a smooth running with WordPress.

When you install a theme on WordPress, you have to be careful to check the security of the scripts and see that there are no loopholes that may leave your website vulnerable to external threat. Many people do not think it is important to make these rudimentary checks but it is advisable to check for any weaknesses in your WordPress especially when you are dependent on themes and plugins to make your website better than the rest.

Use Plugins to Check the Compatibility

To identify bugs, deprecated functions and other incompatibilities on your WordPress, you could either check the codex and identify the scripting errors or use a plugin to look out for the same. While the manual inspection has several advantages (and later in the article have been dealt with in details), if you want an easy way out from the rigorous method, you could use a free plugin to check the themes code compatibility with WordPress. Following the three common such plugins are mentioned:

1. Theme-Check: WordPress is a constantly evolving content management system with continuous and regular updates every now and then. To keep up with the evolving rules and guidelines of WordPress, Theme-Check is one of the free plugins which checks your WordPress theme compatibility with the latest released standards. You can trust this free plugin as this (along with the other two mentioned below) are used by WordPress.org for reviewing any submitted theme. One has to enable the trac formatting option of the plugin so that any error message is copied and pasted into a trac ticket. Theme-Check works from a simple admin menu and you will get immediate results once you run it.

2. Log Deprecated Notices: If there are any deprecated files, functions and function arguments in the theme, this plugin will immediately detect it and will also offer an alternative solution, if any is available. The Log Deprecated Notices is vastly used by WordPress theme developers as it lets them see if all the latest functionalities from WordPress are included in their theme or not. An additional function of the Log Deprecated Notices is that it detects incorrect function usage for all WordPress 3.1+ installations.

3. Debogger: It is a very simple plugin that is bundled with a lot of features. This plugin is also ideal for developer and is used by WordPress.org. Essentially, Debogger debugs your theme extensively and displays the result in the footer. Apart from debugging it also checks for W3C validation on every page. This plugin is extensively used by developers to check for bugs before submitting their creation to the WordPress.org theme directory.

Apart from using plugins to check for compatibility issues on WordPress themes, you can get more technical and look minutely at a few things to detect errors. In the following paragraphs, we will look at some of the areas where bugs and incompatibilities are regularly detected. Possible suggestions are also mentioned.

Check for Deprecated Functions

Very often, we are used to do things a certain way and trust a few things without giving it a second thought. While developing a theme or checking the codex of a theme, this can happen more often then you realize. But what you do not realize is that much of the content of reference that you find online may be outdated and may not have the satisfactory solutions that can match with the latest upgrades of WordPress.

One such thing that you need to be extra careful is having deprecated functions. So how do you check for deprecated functions on your theme? The simplest way possible is to check the codex of the theme and if a function has deprecated, it will be highlighted as a red colored text message mentioning that the function has deprecated. The red text will also mention that a new function has replaced the old function or this kind of thing is no longer supported by WordPress. The codex will look something like this:

The WordPress.org regularly releases the complete updated list of the deprecated functions and you can check it on Deprecated Functions page of the codex.

Do Things the Prescribed Way

If you are a theme developer you have to pay special attention to code quality and integration. You also have to stick to the prescribed way of doing things and use the right codes in the right place. Also prefer to use the WordPress recommended way of doing things especially with scripts and codes. It is also better to go for easy integrations for registering and enqueueing, generating theme URLs, sticking to the recommended methods of working with files, pictures and other data.

Normally any theme will have a default header, footer and sidebar which may seem to work properly in the beginning but after sometime may show problems if not implemented correctly. While including the header.php, footer.php and sidebar.php files be careful to stick to the core functionalities that are compatible with WordPress. You wouldnt want to see a missing code in one of the files any time on your website once it is running.

The functions.php is called the source file as it has the most important information stored. It is from the fucntions.php that you will have to run the hooks, register the scripts, create new widgets and basically run the theme from. Thus it is the first place where you should look out for errors.

Additionally you have to look out for any compatibility issues from all the numerous widgets, plugins that you run in your WordPress powered website or blog. For example, you would usually prefer numerous plugins and widgets to make your blog functional and dynamic. But while installing them, you have to check if they are compatible with the theme you are using.

Conclusion

As we all know WordPress is constantly growing and the core development team keeps updating several things on the platform. If you want your theme to run without any glitches, you have to constantly look out for errors and bugs in your themes script. Test, re-check and stay updated- this is the only way you will resolve all compatibility issues with your WordPress theme.

by: Rekha Bisht




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0