6 WordPress Tips and Tricks

Adding A Side Blog

  1. Pick a desired category and add it in your blog (i.e. category “Side Blog”)
  2. Implement the following code into your “Functions.php” in your theme’s directory:

function asidesFilter($query) {
if($query->is_feed || $query->is_home || $query->is_ search) {
$query->set(’cat’, ‘-115?);
}return $query;}
>add_filter(’pre_get_posts’, ‘asidesFilter’);>

(Notice the number 115 is the category ID number for the chosen category. Yours will be different.)

3. Then add the following into your “sidebar.php” file in your theme’s directory:
<h3>Side Blog
<a href=”FEED URL” title=”My Side blog's RSS feed.”>
<img src=”RSS IMAGE URL” alt=”RSS” style=”position: relative; left: 0;” />
<?php query_posts(’cat=115&showposts=2?); ?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class=”aside_post”>
<?php the_content(’Continue reading...’); ?>
<?php endwhile; ?>
<span class=”aside_archive_link”>
<a href=”CATEGORY URL” title=”More asides.”>Archives</a>
<?php else : ?><p>Sorry, the side blog is having a little trouble.</p>
<?php endif; //if you delete this the sky will fall on your head ?>

Enhancing Your “Read More” Link

  1. Open your “index.php” or file and find this line:
    <?php the_content(__(’Read more’));?>
  2. replace it with this one:
    <?php the_content(”Continue reading ” . the_title(”,”,false), 0); ?>

Enhancing Your “Comments” Link

  1. Open your index.php, archive.php, and single.php and find this line:
    <?php comments_popup_link(’Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?>
  2. Replace it with this one:
    <?php comments_popup_link(__(’No comments on ‘ . the_title(”,”,false)),
    __(’One comment on ‘ . the_title(”,”,false)), __(’% comments on ‘. the_title(”,”,false))); ?>

Random Tip #1

Do NOT use the following search code in the
“search.php” file in your theme’s directory :
<?php echo $_SERVER [’PHP_SELF’]; ?>
Nobody should be allowed to search your entire server right?

Use this instead:

<?php bloginfo (’home’); ?>

Random Tip #2

Yet another bad code used in title tags or search templates:
<?php echo $s; ?>
as it allows some harmful Sql injections =(.

Use this instead:
<?php echo wp_specialchars($s, 1); ?>

Random Tip #3

Block search robots from your archive page by preventing the indexing:
<?php if(is_archive()) { ?><meta name=”robots” content=”noindex”><?php } ?>
Paste it anywhere in the “Header.php” file of your current theme’s directory in the <head> tags.

Hope this helps. Thanks for reading and have a wonderful day!

Is This the Future of Premium WordPress Themes?

Over the past year now, the premium WordPress themes market has really grown from nothing to what we see today, with a record number of authors are either offering premium themes, or selling premium versions of their existing popular free themes.   It truly is amazing to me that this wonderful software that we all love so much is able to help so many people to make money to feed their families while at the same time showing off their design skills.

This weekend I noticed something new and got me thinking a bit about where the premium WordPress themes market is headed.   As many people have said in the past, there are concerns that the premium themes we see today are becoming so common that people are missing out on that unique feel that many people buy these themes for.   I would of course argue that these themes were designed to be templates to be customized from rather than as an end-user product.   You could also argue that there are so many authors and designs now that buying a theme could still give you that unique look that people crave.

With that said, there appears to be a new solution.   We’ve seen theme clubs be talked about and eventually surface in a few places, but now it appears that Brian of Revolution has set another trend by offering his first of many exclusive themes:

What is an Exclusive Theme and How Does it Work?

In the screenshot above, Brian has released an incredible new theme, which is variation of his popular Revolution theme.   It is available only for a limited time and only a limited number to be sold (I believe in this case only 10 will be sold).    If you’d like a copy, you can get it for $499.95.

As far as my thoughts on Exclusive themes, I personally am unsure whether this business model will work.   It appears that 10 themes will be sold in total, so it isn’t truly a unique theme to your site, and the price range is getting close to the price that a company like a Unique Blog Designs or Blog Design Studio would charge for a 100% custom theme for your website. If you are going to spend that kind of money on a custom theme, wouldn’t it be better to spend a little extra to get a truly custom theme that you won’t find on 10 other sites?

With that said, I still haven’t made up my mind yet on this and would love to get your thoughts.  What do you think of this new business model?

Top 5 WordPress Navigation Menu Tutorials

Navigation menu is a really important part of a website, both visually and functionally. Though, I noticed that most blogs use a really simple navigation menu. A simple menu can be good sometimes, but if you’re looking for something more sophisticated, I’m pretty sure you’re going to enjoy this list.

Here’s 5 really cool tutorials to help you create a stunning navigation for your WordPress blog.

Creating Two-Tiered Conditional Navigation in WordPress

Which WordPress user doesn’t know Darren Hoyt, the creator the free magazine theme Mimbo Magazine ? In this great tutorial, Darren explains how to create a professional two-tiered navigation menu. Source

How To: Making a Categories Drop-Down Menu

This was my first post on Hack WordPress, and seems like you guys enjoyed it. In this tutorial, I explain how to create a navigation bar with a category drop-drown menu. Source

WordPress: “Magazine style” Horizontal dropdown menu

One of my last tutorials, published on my blog CatsWhoCode. This how-to explain how you can create an horizontal dropdown menu. Source

Using Sliding Doors with WordPress Navigation

This sliding doors CSS hack allows you to create sophisticated tabs for your navigation bar. Sadly, WordPress core functions wp_list_pages() and wp_list_categories() don’t allow you to add the required span tag to use this technique.
This tutorial will show you how to bypass this limitation by using a hack, and then you’ll be ready to enjoy sliding-doors for your WordPress navigation! Source

Any other navigation tutorial that should be in the list? Leave us a comment below!

Integrating Forums Into a WordPress Blog

Integrating forums into a WordPress blog is a topic I covered in great detail in the Hack WordPress eBook, Finding Success with WordPress, but I just realized it hasn’t really been discussed much here on this site.  Therefore, I decided to write up this post to kind of bridge that gap.

Before I get into what you need to add a forum to your WordPress blog, I first want to share my opinion on forums in general.   Though you’ll often see WordPress bloggers adding a forum on a directory or subdomain of their established blog, I personally recommend anyone considering building a forum to do so on a separate domain (even if it is just your blogs name with the word forum/forums after it).

If you look around at the most popular forums, an overwhelming percentage (probably 90%+) are hosted on their own domain name.  This is because forums rely heavily on direct traffic, rather than on search engines and other sources.   If you go this route, you’ll want to try to integrate the two sites in other ways.  Here are a few ideas:

  • Branding – Use the same logo as your blog (with the forums domain name) or a similar logo on your forums to help readers to know the two sites are associated.
  • Link Integration – Add a link to your forums from your established blog and add a link to your blog from your forums to show association.
  • Forum Theme – If you have the technical knowledge or use the method I will cover below, you can create a similar theme for your new forums.   This will also help readers to know that the blog and forums are affiliated with each other.

I know many people would still prefer to build their forums into their existing domain name, so here is some information that will hopefully help.

How to Integrate Forums Into Your WordPress Blog

Setting up a forum for your blog is as simple as finding the right WordPress plugin or software to install.  Here are the primary three I recommend depending on your situation and needs:

  1. BBPress – This is a free and lightweight open source forum software that was designed specifically for WordPress users.  It is also currently owned and supported by the WordPress team (Automattic).   In order to use this software, you simply need to download the software, place it on your server where you want your new forums to be, then go to that website and use the installer to finish getting setup.  It comes with an admin panel so you can customize your forums to look and work the way you want them to.
  2. PhpBB – PhpBB is another free open source forum software that is known for its customizability.  The newest version, version 3.0, offers a great forum look for your website.  PhpBB also has a skins folder (themes) and many premium WordPress theme authors offer free forum skins if you buy their themes.  Examples of this include Brian’s Revolution themes and the popular WP Remix theme.  If you go this route, you can simply upload the skin and activate it within your forums control panel to make your PhpBB forums match the look of your theme!  If you’d like to get an idea of what a WordPress forum might look like when integrated with a blog, check out this post over at Profit Blogger.   It includes some information as well as screenshots of integrated WordPress forums, using the Revolution themes mentioned above as examples.
  3. VBulletin – This is by far your best option, and probably the forum software you see being used on most of the popular forums you visit regularly.  Unfortunately, though, you will have to purchase a license to use this software.  At last check, you can either lease your license or own a license.  Leasing is roughly $100.00 a year, but you can own the software for that domain for $180.00 (with a years support).   They also offer installation services and support for an additional fee.

Once you’ve picked out your forum software, simply activate the plugin or run the install script that comes with the software.   Each option comes with its own admin/control panel, so you can set it up to look and function the way you want it to.

How To: Add Breadcrumbs to Your WordPress Blog

Over the past couple of years, breadcrumbs have really taken off around the internet and it seems like all sorts of major websites are now using them. Unfortunately blogs in general, and WordPress in particular, haven’t really adopted the use of breadcrumbs, which is a huge shame in my opinion. Breadcrumbs are great for improving both reader navigation of your website while at the same time assisting the search engines with determining the structure of your website. In other words, breadcrumbs are super sexy and great SEO for your blog.

So, does your WordPress theme have breadcrumbs built into it?   Whenever I’m picking a new WordPress theme to start designing a new site with, breadcrumbs are one of the first things I always look for.  With the exception of Brian’s Revolution themes, I’ve found that there really aren’t many (if any) other premium themes that come with breadcrumbs built into them (directly or via a WordPress plugin).  I also have yet to find any free WordPress themes that come with breadcrumbs built into them.

How to Add Breadcrumbs to Your WordPress Blog

Fortunately many WordPress plugin authors have come to our rescue. For those of us that want breadcrumbs in our themes, there are now a number of WordPress plugins out there that you can use to easily accomplish this. Probably the most popular is the Breadcrumb Navigation XT WordPress plugin, but I just noticed today that a new WordPress plugin was released by Joost de Valk called the Yoast Breadcrumbs plugin. Joost has a great reputation as a plugin developer, so I have a feeling this plugin will work great as well.

If you decide to go with the Yoast Breadcrumbs plugin, you just need to upload and activate it, then place the following code where you want the breadcrumbs to display (usually above your post title or the content hook):

<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>');
} ?>

Then you can use the plugin settings to get the breadcrumbs to behave how you wanted it to.

Call to Theme Designers

Where is the breadcrumbs love?   If you are working on a new free or premium WordPress theme, why not take a few seconds to build breadcrumbs into your theme?

If you’d like to see breadcrumbs built into more WordPress themes by default, leave a comment below so designers know there is a demand for it!