eUttaranchal

Re-Writing the Web

Archive for October, 2009

Thumbnail for Excerpts : Hack for Wordpress 2.8+

Posted by Bhupendra On October - 28 - 2009

I was stucked with Thumbnail for Excerpt plugin behaving unexpectedly with Wordpress 2.8.2

Thank you Cory for sharing the plugin hack to make it work.

Bug: The Thumbnail for Excerpt plugin showing the same thumbnail image with all the posts (with Wordpress 2.8.2+)

Solution: Edit the plugin in plugin editor. Replace lines 28 & 29 with this:

global $wp_query, $wpdb, $post;
$id = $post->ID;

The actual lines of code look like this

global $wp_query, $wpdb;
$id = $wp_query->post->ID;

Replace these lines with

global $wp_query, $wpdb, $post;
$id = $post->ID;

Highlight the Background of Current Page in Wordpress

Posted by Bhupendra On October - 7 - 2009

I was stucked finding an easy solution to highlight the background of the current (active) page in wordpress. The solution is however too simple. Just add the following CSS code in your stylesheet (style.css)

#menu_id li.current_page_item a{
    background:#2E8DE6;
}

Note: Be sure to replace #menu_id with the id of your navigation bar. In this case, the list of my pages is contained in a div with id menu_id

highlight-active-page