Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework

It’s not because of the archive_box in cpt-archive-settings.php but because of genesis_taxonomy_archive_options in genesis/lib/admin/term-meta.php. You can remove it using if you place the following in child theme: remove_action( ‘admin_init’, ‘genesis_add_taxonomy_archive_options’ ); Update: Those settings are appearing because of the action genesis_add_taxonomy_archive_options attached to admin_init hook. add_action( ‘admin_init’, ‘genesis_add_taxonomy_archive_options’ ); Which again is like this function … Read more

Which php file lists all the post of a category

WordPress uses a hierarchy of templates (see the visual overview) which it checks for presence. In your case when showing a category archive it will check for presence the following files in this order and use the first one it finds: category-$slug.php (In your case probably category-news-events.php) category-$id.php category.php archive.php [paged.php] if paged index.php So … Read more

How to filter archives both by category and tag?

What you are looking for is a custom search that can be created via rewrite rules. What I’m gonna do is to create a rule that adds some queries to the URL. First, let’s define a rewrite tag so that WordPress recognizes our custom URL. function my_rewrite_tag() { add_rewrite_tag(‘%custom-categories%’, ‘([^&]+)’); } add_action(‘init’, ‘my_rewrite_tag’, 10, 0); … Read more

How to create taxonomy values for pages and list them in wp-admin

This is definitely possible, and pretty easy too! If you’d like to register an existing taxonomy (i.e. category) with an existing post type (i.e page), register_taxonomy_for_object_type() can be used. E.g.: add_action( ‘init’, ‘wpse_register_category_tax_for_page’ ); function wpse_register_category_tax_for_page() { $taxonomy = ‘category’; $object_type=”page”; register_taxonomy_for_object_type( $taxonomy, $object_type ); } A new taxonomy can be created and associated with … Read more

How to control template resolution if both Author and Category filter in place?

You could change the template loaded by hooking onto template_include, checking if is_author and is_category are both set, then switch the template for inclusion to the author template instead. Give this a shot.. add_filter( ‘template_include’, ‘my_template_setter’ ); function my_template_setter( $template ) { if( is_author() && is_category() && is_archive() ) $template = get_author_template(); return $template; } … Read more

How to override Category rendering mechanism

if you can use template_redirect hook and a simple function to set the template to use add_action( ‘template_redirect’, ‘category_set_redirect’ ); function category_set_redirect(){ //create the sets of categories $first_set= array(“1″,”2″,”3″,”4″,”5″,”6”); $second_set= array(“7″,”8″,”9″,”10″,”11″,”12”); if (is_category()){ if (in_array(get_query_var(‘cat’),$first_set)){ include(TEMPLATEPATH . “/first_category.php”); // include the corresponding template die(); } if (in_array(get_query_var(‘cat’),$second_set)){ include(TEMPLATEPATH . “/second_category.php”); // include the corresponding template … Read more