Is Your WordPress Theme Plugin-Friendly?

Did you know that the correct functioning of some plugins is dependent the “plugin-friendliness” of your WordPress theme?

The themes that come default with WordPress are okay. But if you’re using a theme designed by someone else, you might want to inspect it to make sure.

First go to the “Theme Editor” tab under the Design or Presentation section. You’ll see a list of files — click the files whose names are listed below, and look for these lines of code. (Of course, if any of this code isn’t there, you can always copy/paste it in yourself and click Save.)

  1. Header — Does your theme have this important line of code before the </head> closing tag? It’s used by plugins to insert JavaScript, CSS, meta tags, etc. WordPress itself even uses it to insert some header code.

    <?php wp_head(); ?>

  2. Sidebar — Although not as commonly used by plugins, it would be good for this code to be found in the “Meta” section of your sidebar:

    <?php wp_meta(); ?>

  3. Comments — This should go at the end of your comment form, before the </form> closing tag. It’s critical for the function of some plugins, such as the popular “Subscribe to Comments.”

    <?php do_action('comment_form', $post->ID); ?>

  4. Footer — This line of code should be at the bottom of your theme. It can be used, among other things, to insert JavaScript code or statistical information (spam counters, etc).

    <?php wp_footer(); ?>

Did your theme pass the test?

Did you enjoy this post? to get even more WordPress tips, news, and resources!

StumbleUpon

3 Comments

  1. Posted June 6, 2008 at 1:56 pm | Permalink

    i think some of my plugins or my theme has disable features (such as avatars) in WP 2.5.1…what do i do, change my theme?

  2. Posted June 6, 2008 at 2:08 pm | Permalink

    @natural: Yes, the easiest way to add WP 2.5 avatars is to find a theme that supports them.

  3. Posted June 30, 2008 at 3:25 pm | Permalink

    “natural”: Try the “Easy Gravatars” plugin if your theme doesn’t already support them.

    John: Good article. Short and too the point. You might be a bit more specific in that wp_footer should probably go right before the closing body tag.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*