Display WordPress Tags in a Drop-Down Menu

September 27, 2008

Tags are useful to any blog: As you know it, they allow the user to display a list of posts related to a subject. Most of the time, tags are displayed with in a tag cloud. If you have 20 different tags, that’s ok, but if you have 100 or more tags your tag cloud will be very hard to read, and no-one will click on it. This is probably why many blogs recently stopped displaying their tag cloud, or put it on a separate page. First, we have to create a php function. Copy and paste the following code in the functions.php file... [Read the full story]

Display Author Photo In WordPress

September 24, 2008

The beauty of WordPress is it allow multiple authors for a site or even a single post. It is a good practice to show the author photo within a post written by him/her. Besides, we can also add a short “about me” description before or after every posts. Here we go: Step 1 Create a new directory in at wp-content/images and name it as authors, so it will become like this directory at wp-content/images/authors. Step 2 Upload a picture which is named the same as your author ID. Don’t know where to get your author... [Read the full story]

Create an Ajax-based Auto-completing Search Field

September 16, 2008

Why not helping your visitors to find what they’re looking for on your blog, by using a cool auto-completion on your search field? To do so, we’ll use WordPress tagcloud, php and ajax. Please note that even if this code is fully functional, this is an experimentation, and the SQL query isn’t really optimized. The idea We will use tags as a list of keyword to suggest to the readers. When someone will start to type on the search field, we will use Javascript to send a request to a php page which will do the following... [Read the full story]

Displaying Your Most Commented Posts

September 16, 2008

Though this isn’t quite the same as displaying your most popular posts in your sidebar, here is some code you can use to display the posts that have received the most comments.  You’ll want to place it in your sidebar where you want the code to be displayed. Most Commented Posts Code Go into your theme files and go to header.php file.   Somewhere within the </head> you’ll want to place the following code: <?php most_popular_posts($no_posts = 5, $before = '<li>', $after = '</li>', $show_pass_post... [Read the full story]