Is your WordPress Theme holding you back?

Most WordPress Themes are created to look good, and rarely to play well with the plugins you choose to install.

I often encounter WordPress Themes which have customized code, which limits the functionality of the plugins I try to use.

The choice behind this is not necessarily a bad one, as the developers try to make it as easy for everyone to use, yet it limits more advanced users.

Let me show you an example I recently encountered.

The following code-snippet is from the header.php file of a theme I was tweaking for SEO purposes:

<?php if (is_home()) : ?><?php bloginfo(‘name’); ?> – <?php bloginfo(‘description’); ?>
<?php else : ?>
<?php wp_title(”, ‘false’); ?> – <?php bloginfo(‘name’); ?>

<?php endif; ?>

The code above can be confusing for users that are not used to program in PHP, so let me explain.

The content of the title-tag is PHP-code, and is the title of the homepage itself. This is what will be shown in the top of your chosen browser.

With the code above, the theme showed the name of the blog and the description on the frontpage, and on all other pages, the title of the post/page followed by a “-” hyphen and then the name of the blog. (This is set up in the settings of your blog).

Read also  10 WordPress Plugin Ideas for Bloggers

This is fine for most purposes, but when you want to tweak individual posts or perhaps the entire homepage to improve SEO, you will usually turn to a plugin, and the above code limits the functionality of these plugins.

The solution is quite simple. I edited the header.php of the theme, and changed the code to the following:

<?php
wp_title(”,’false’);
?>

This code allows any plugin to manipulate the title of your homepage, instead of being limited by the Theme developer.

2 thoughts on “Is your WordPress Theme holding you back?”

  1. Hi, I just wanted to say thanks for this post. It helped me configure my wordpress theme to work with the Headspace2 plugin. I don’t know a thing about php but your clear language made it easy to make this change to header.php. Keep up the great work!!

  2. I am a beginner in PHP but good at html though. This post clearly explained me and surely for those who would like to tweak wordpress , without PHP knowledge. Hoping to hear more from you like this.

Comments are closed.

Free eBook - 

Guide to success with SEO

Join the newsletter for more interesting articles, discount code for SEO Booster Pro and much more.

Guide to success

with SEO 2018

FREE

We respect your privacy and do not share your details with others

Join our newsletter and get a free eBook, interesting articles, discount codes and much more.