Converting The Author Display To Link To The Author

May 12, 2008

If you are setting up a WordPress blog to work with a variety of authors, it is probably a good idea to also set up the author display to actually be a link to the bloggers website. For whatever reason, many themes are created to simply display the author’s name using text by default instead of converting it to a link to the author’s website. Fortunately, this is an easy change to make with a minimal amount of coding adjustments required. Here is what you need to do. When editing your theme, you’ll want to look for... [Read the full story]

Converting Your Category Pages to Display Post Titles

May 12, 2008

I’ve always liked the idea of showing only the post titles on your category pages. If you are good at making post titles, this should help someone navigating your categories to find what they are looking for. First, you’ll want to open your archive.php file and find the post loop. It usually starts with this code (or something similar): <?php if (have_posts()) : while (have_posts()) : the_post(); ?> You’ll want to delete everything from that code down to the end of the loop, which usually ends with this: <?php... [Read the full story]

Alternating Your Post Background Colors

May 12, 2008

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... [Read the full story]

Display Adsense On Your First Post Within The Loop

May 12, 2008

In this guide you’ll learn how to display Adsense on just your first post within the Loop. Sure, there may be plugins that will do this for you. This guide, however, will use code examples to accomplish the same thing by editing your WordPress theme. The first step is to open up your index.php file in your theme editor. Find the following line: <?php if(have_posts()) : ?> Just above that, insert the following like this: <?php $i = 1; ?> <?php if(have_posts()) : ?> Now, scroll down a bit until you find... [Read the full story]

Using a WordPress Page as your home page

May 6, 2008

I’d like to use something other than my recent posts as my home page. Is that possible within WordPress? It’s not only possible it’s relatively easy. The first step is to create a page to serve as your new home page. For the purpose of this example, we’ll call it “My New Home Page.” Under the Manage panel select the Pages tab. Click on Create a New Page. Give the page a title, “My New Home Page.” Create the content for your home page just as you would a blog post. Set the Page Status to “Published.” Click... [Read the full story]

Page 52 of 56« First...«5051525354»...Last »