Currently Browsing: Content Display

How to replace Read More with an image

Sometimes it’s preferable to have a button instead of text to allow the reader to jump to the rest of a post. Following is the code to replace the text with an image:

 <?php the_content('<img src=
"' . get_bloginfo('template_directory'). '/images/readmore.png"
alt="read more" title="Read more..." />'); ?>

Obviously, replace /images/readmore.png with your image director and file name.

(This is slightly different from the instructions in the WordPress Codex, which did not work for me.)

How to use WordPress 3.0 Menus feature

Justin Tadlock always does a great job of covering new WordPress features, and this article is no exception. WordPress 3.0 has a new Menus feature that will make navigation design much easier for the average user as well as for theme designers.

Show ads only to search engine visitors

Search engine traffic is where you really make money on Adsense, so some blog owners choose to show ads only to visitors who come in through the search engines. This article explains how to accomplish that and to show alternate content to other visitors.

Add Google Adsense into post wherever you want

This post explains how to give the post author the ability to add Google Adsense (or any other content of course) into a post wherever they like by using a shortcode or just a certain text string using the str_replace() function. Very useful!

Automatically insert items anywhere in post content

This is a helpful article about ways to automatically insert certain content in various areas of the post, such as before plugin output at the end of a post, or just after the “more” tag.

Style author comments differently on blogs with multiple authors

The original way to highlight author comments only works for one user ID for the whole site. This article explains how to highlight comments of authors on blogs that have multiple authors.

Add widgetized areas to your WordPress site

This is a complete guide to adding a 4 column footer widget area to your site. The principles apply to adding widgets in in any area of your theme though.

Put ad after first post on the page

Often there is a need to insert ad code (or other bit of content) directly after the first post on a page, but not after any others. You can do this by adding a counter and an if statement to the loop.

Guide to creating custom WordPress loops

Learning to use custom loops is a must if you want to get beyond the basics in customizing themes for WordPress. This guide is clear and concise and even includes info about using the custom loop in the sidebar and in the Thesis theme, as well as creating a related posts section in your theme. (For the record, if I’m doing much with this kind of thing in the sidebar, I usually install Justin Tadlock’s Query Posts plugin which is seriously the most awesome plugin I know of.)

Save space in the sidebar with DOMTabs

The more items you can get above the fold the better, and DOMTabs are a great solution for packing a lot of content in a small space.