One thing I’ve always loved to do is set up my blogs comments to display alternating background colors (although ironically I have not done so for this site yet). I’ve always felt that this helps give the comments a little more separation from each other and improve the overall look of the blog.
Because WordPress is full of loops (homepage, category, tag, etc.), this same theory can truly be applied all over your blog. David of CyberCoder posted yesterday a great hack to alternate the background of your blog posts. Here are the steps you need to take:
Create a loop counter. Right before the Loop begins set a variable to zero.
<?php
$x=0;
if (have_posts()) : ?>At this point I would want the Background Color to change, insert code to test for an even number post, and if this is true, add an inline CSS style for the background that would override the stylesheet.
<?php if ($odd = $x%2){?>
<div style=”background-color:#404040;padding:10px 0px 10px 10px;”>
<?php }?>Then, where the background color should return to the original state, run the same test for the even numbered post and close the div tag set by the Inline Style.
<?php if( $odd = $x%2 ){?>
</div>
<?php }?>The final step is to add 1 to the counter for each post, which is done at the end of the loop.
<?php
$x++;
endwhile; ?>
Thanks for sharing this trick David!
Recently I wrote a post requesting a “parked” theme be created that received a pretty good response. Many of the comments actually pointed me to an existing WordPress theme known as LaunchPad, which the author advertises as a parked theme.
While this isn’t exactly what I meant by a parked theme, I think that it is a great free WordPress theme that I figured I would share with everyone. The basic idea of this theme is to be a placeholder before your launch your blog. When you buy a domain and plan on launching a website, you put this theme up while you work on building your blog. Once ready, just replace this theme with your blog.
As you can see, it is a very clean and simple design that includes a button so people can subscribe via RSS or e-mail so that they can start getting updates once the website is launched.
For those of you unfamiliar with Robots.txt, it is a file that webmasters use to help control what aspects of their websites are indexed by search engines and what parts are not to be indexed. This is a great way to give you full control of how they view your website and help avoid duplicate content penalities, but using a Robots.txt has to be done properly and responsibly in order to avoid making matters worse or accidentally preventing your website from being indexed all together!
There are a lot of posts out there that talk about a Robots.txt file, how to set one up, etc. Unfortunately, many of these posts don’t apply specifically to WordPress and can often get confusing when you are trying to implement one for your website. Others tend to leave out a lot of important information that most people should have prior to attempting to add a Robots.txt file to their blog’s root directory.
Ask Apache is offering a Robots.txt file and updated Robots.txt file that you can download and use for your blog. You’ll of course want to customize it to meet your needs, including adding any directories that you have created since installing the base WordPress install that you don’t want them to be indexed.
I recommend you bookmark these posts if you plan to tackle adding a Robots.txt to your blog at some point in the future. Both posts provide a lot of valuable information and, as mentioned above, includes actual templates you can use for your website.
WordPress has long been used for helping people to easily create a functional and attractive looking weblog, but only recently have people started to use it for CMS purposes and even business blogging.
When you go to build a professional business blog, you need to bring a different mindset to the table. Many of the popular WordPress plugins often won’t apply to your average business blog. So what plugins should your business blog use?
WebHypes has taken the time to throw together a great list of 15 WordPress plugins that are ideal for a professional blog. You’ll find a few of the usual suspects, but you’ll also get a bunch of other plugins you might not have thought of.








