How do I override the search template in a plugin?

You can use template_include filter hook add_filter(‘template_include’,’my_custom_search_template’); function my_custom_search_template($template){ global $wp_query; if (!$wp_query->is_search) return $template; return dirname( __FILE__ ) . ‘/my_search_template.php’; } /*UPDATE: there was a missing “;” after $template*/

How can I force URL of a custom post type archive to use a page template?

You can pass a string for has_archive. That string will be used as archive URL. So in your registration code use: ‘has_archive’ => ‘jobs’ From the register_post_type() declaration in WordPress core: if ( $args->has_archive ) { $archive_slug = $args->has_archive === true ? $args->rewrite[‘slug’] : $args->has_archive; if ( $args->rewrite[‘with_front’] ) $archive_slug = substr( $wp_rewrite->front, 1 ) … Read more

URL / Templating system advice [closed]

Do you have: A category somecategory defined? Posts categorized with somecategory? Some default else: content in the Loop in category.php? I suspect the URL is returning a 404, and WordPress is simply serving up the root URL, because it has no content to serve up from category.php. EDIT You don’t need to do anything special … Read more

Sub category templates

I found the answer – this was in the function.php file – I just needed to update the category ID (long story): function inherit_template() { if (is_category()) { $catid = get_query_var(‘cat’); $cat = &get_category($catid); $parent = $cat->category_parent; $cat = &get_category($parent); if ($cat->cat_ID == 215) { if (file_exists(TEMPLATEPATH . ‘/category-limousin-magazine-templates.php’)) { include (TEMPLATEPATH . ‘/category-limousin-magazine-templates.php’); exit; … Read more

Where is Number of Posts Set?

That looks like a http://para.llel.us/support/ theme. You might start there for docs—for instance, they probably have a custom ‘Theme Options’ page in the admin. Short of that, and presuming you’re ok with setting it in code (which may negate any future settings in the admin), you’ll first need to find out where $blog_query is being … Read more

How can I improve this taxonomy treating approach?

This is what functions.php is for. Add the function to functions.php, with just a slight modification that will allow you to pass in which category you want to get the children of: function the_categories_navigations_trees( $parent ) { $cat_data = get_categories( array( ‘parent’ => $parent, ‘hide_empty’ => 0 ) ); if ( $cat_data ) { $cat_links=””; … Read more

Bizarre issue with custom RSS template

First off, as background context, after a lot of Googling, this is the method I’ve chosen to create the RSS template. (If there’s a better approach, I’m all ears): Second time this comes up today. 🙂 You should use add_feed() ( source ) rather emulate this stuff with page. As for issue you describe I … Read more