ThemeShaper Forums » Thematic

[closed]

Search widget not functioning on queried index

(1 post)
  • Started 3 years ago by notlaura
  • This topic is not resolved
  1. In my theme I provide an option for users to set a 'blog category' that queries and displays only posts from that category on the index page by filtering thematic_above_index_loop:

    function get_blog_cat()	{
    	// Get the option
    	$shortname = get_option('of_shortname');
    	$cat_option = get_option($shortname.'_cats_in_blog');
    	$cat = get_cat_ID($cat_option);
    	// Query the index loop
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=$cat&paged=$paged");
    }
    
    add_filter('wp_head', 'get_blog_cat');

    This works well, but the search widget breaks. My guess is that this is because I'm querying the index page...is it better to set this option in index.php rather than in a filter? Any help/ideas are greatly appreciated.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.