Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vinothkannans/acc2655f8e6e407b4965daf6f8e1edb1 to your computer and use it in GitHub Desktop.
Save vinothkannans/acc2655f8e6e407b4965daf6f8e1edb1 to your computer and use it in GitHub Desktop.
taxonomy filter for Newspaper theme
1. Add configure panel in td_config.php insert after line #3830 array( “param_name” => “taxonomy”, “type” => “textfield”, “value” => ’’, “heading” => ‘Filter by taxonomy’, “description” => “Filter by taxonomy of post type”, “holder” => “div”, “class” => ””, ‘group’ => $group ), array( “param_name” => “taxonomy_name”, // search taxonomy using name, change to ‘slug’/’id’ if required. “type” => “textfield”, “value” => ’’, “heading” => ‘Filter by taxonomy name’, “description” => “Filter by taxonomy name of post type”, “holder” => “div”, “class” => ””, ‘group’ => $group ),
2. Add search query in td_data_srouce.php insert after line #243 if(!empty($taxonomy) && !empty($taxonomy_name)){ $wp_query_args[‘tax_query’] = array( array( ‘taxonomy’=>$taxonomy, ‘field’=>’name’, ‘terms’=>$taxonomy_name)); }
@vinothkannans
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment