Show the Number of Results in WordPress search
March 18, 2009
The typical WordPress search results page has the title “Search Results.” It’s not very helpful, but we can make it much more dynamic, very easily. Let’s change our title to something like “Search Result for search terms - 8 Articles” Open your search template file, search.php. In it, search for the following: <h2 class="pagetitle">Search Results</h2> Now replace this with: <h2 class="pagetitle"> Search Results for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key... [Read the full story]
Remove the suffix dot from the excerpt
March 14, 2009
Did you ever wondered why the the_excerpt() function always display [...] at the end of the post excerpt? To be honest, I don’t find this very beautiful. So, what about remove it? To get rid of the [...] at the end of the post excerpt, simply paste the following function in the functions.php file from your theme: function trim_excerpt($text) { return rtrim($text,'[...]‘); } add_filter(’get_the_excerpt’, ‘trim_excerpt’); Read More →
Remove widget areas without editing wordpress template
March 12, 2009
One thing that’s always bothered you about needing to remove your widgetized areas(Sidebar, most of the time) in WordPress is that you have to dive into template files to do it. For example, you may want to create a post that doesn’t need widgets shown. That typically requires a little editing of your files. If you don’t feel like editing your theme files, no problem, here is the solution. What we’ll be showing you is two quick and easy ways to disable widget areas using your theme’s functions.php... [Read the full story]
Insert special characters between wordpress menus items
March 12, 2009
The wp_list_pages function of wordpress is very useful, but sometimes it can be a bit frustrating. For exemple when you want to insert characters as such as “//” between menu items. Happilly, here is the solution to this problem. To do so, simply paste the following code where you want your wordpress menu to be displayed. <?php $char = ' \\ '; wp_list_pages('link_before=<li>&link_after='.$char.'</li>'); ?> Read More →
Avoid duplicate content in wordpress paged comments
March 12, 2009
Introduced in WordPress 2.7, paged comments are great, especially when you have lots of comments. Thought, if your <title> tag isn’t optimized, your blog could produce some duplicate content, which is bad for SEO. To avoid duplicate content problems, you need a different title and a different meta description. The easiest way to do this is to add ‘Page X’ into the title and meta description of the blog post. Open your header.php file. paste the following code into your theme’s header just before... [Read the full story]




















