Archive for the ‘WordPress Tips’ Category

On a WordPress site of mine, I was perplexed as to why it was not getting indexed in Google or other search engines.

I verified my site in Google Webmaster Tools and tried to submit a sitemap. In the webmaster tools panel, it informed me that my robots.txt file was blocking Google from grabbing my sitemap.

This confused me, as I know I would never knowingly make a robots.txt file to block search engines.

Read on to find out what the problem was, how to fix it, and how it happened in the first place…

Read the rest of this entry »

Subscribe to RSS

By: Leland on Jun. 22

Bookmark and Share

It was recently announced that WordPress.com blogs have XML sitemaps, which are automatically submit to search engines for better search indexing and optimization.

Now, most of you reading this are probably self-hosted WordPress users. How do you get your own sitemaps for your self-hosted blogs? This is where the Google Sitemap Generator plugin comes into play.

Contrary to the name, the plugin will actually automatically generate and submit sitemaps to not just Google - but also Live, Yahoo, and Ask. This will provide a similar automated sitemap solution, similar to the feature WordPress.com recently rolled out. More information on this plugin can be found in this WordPress SEO tutorial, an earlier article featured on Theme Lab.

Subscribe to RSS

By: Leland on Jun. 17

Bookmark and Share

One plugin which I use frequently on my WordPress development projects is the Top Level Categories plugin. What this plugin will do is remove the /category/ from the URL upon activation. For example:

http://www.example.com/category/uncategorized/ will change to http://www.example.com/uncategorized/

No other configuration to the plugin is needed, all you need to do is activate. This plugin is best used in combination with a permalink structure like /%category%/%postname%/.

Subscribe to RSS

By: Leland on Jun. 7

Bookmark and Share

If you get an error like this, there is a plugin or other function called in your theme which you don’t have. How do you fix this? There are a few ways: remove the code, error proof it, get the necessary plugin, or upgrade WordPress if necessary. In this quick WordPress tip post we’ll go over how to error proof these with a conditional tag and PHP function known as: function_exists.

If you get an error such as Fatal error: Call to undefined function the_title_attribute() you can simply replace any instance of the_title_attribute with the following:

<?php if (function_exists('the_title_attribute')) { the_title_attribute(); } ?>

In this case, you could also take it one step further by adding an else statement.

<?php if (function_exists('the_title_attribute')) { the_title_attribute(); } else { the_title(); } ?>

Before trying a new theme on a production site, make sure to preview your theme first, and then work out all the errors (if any).

Subscribe to RSS

By: Leland on Jun. 1

Bookmark and Share

You don’t need any custom queries or database calls just to get a list of recent posts. In fact, there’s a function built into WordPress that will do just that. It’s called, wp_get_archives(). You might recognize that as a way to display monthly archives, but with a few parameters, you can modify it to display a list of recently published WordPress posts. Here’s the code:

<?php wp_get_archives('title_li=&type=postbypost&limit=10'); ?>

What this will do is strip any WordPress added formatting and output a nice list of the 10 latest posts, each within it’s own <li> tag.

Subscribe to RSS

By: Leland on May. 26

Bookmark and Share

I know this tip may be very obvious to some, but I keep seeing “admin” as the author name on many WordPress blogs. I thought I’d write this quick tip post because these WordPress bloggers may not even know how to change the publicly displayed author name. Fortunately, this is very simple to do. In your WordPress admin panel, select Users -> Your Profile. On this page, enter whatever you want as your nickname, and click “Update Profile.”

WordPress Author Nickname

Once that’s done, select this newly created nickname from the “Display name publicly as” dropdown menu. Update your profile again, and that’s it.

Subscribe to RSS

By: Leland on May. 20

Bookmark and Share

If you want to test out a WordPress theme before it goes live on your blog, then I’ve found the perfect WordPress plugin for you. It is called Theme Test Drive. It’s very simple to use. Get the plugin from here at the WordPress.org plugin directory, install the plugin, and activate. On your design menu, select the theme you wish to preview from the dropdown menu and enable it.

WordPress Theme Test Drive

The theme will be visible to you (the admin) only. Make sure you disable any “cache” plugins before using Theme Test Drive, as it will likely cause problems. Enjoy!

Subscribe to RSS

By: Leland on May. 19

Bookmark and Share

Recent Comments

  • Nisheeth: Hi, How to make changes to the main page, like changing the text of About or removing it
  • Marshal: Hi Leland, I am a big user of these theme, but I run my blog in Spanish, so every time the theme is updated...
  • Dan Gheorghe Somnea: Hello, I am an wordpress newbie. I appreciae this 3 columns wordpress theme as an oportune for...
  • Anto: Meh this looks interesting. I hope they put better themes up there tho. Or design some with they’re...
  • #FN$#: Really? Oh,thank you!! I’m glad you like it!…

About The Author

Welcome to Theme Lab. My name is Leland, and I run the place. I write all the tutorials and code all the themes you see here on the site.

For more information about me, feel free to read the about page. If you want to drop me a message, feel free to contact me.

Interested in advertising on Theme Lab? We have advertising available at very reasonable rates. Head on over to the advertising page for further details.

Please read our Privacy Policy and Terms of Service in regards to theme usage.

© 2008 - Theme Lab - Powered by WordPress