Created
June 23, 2017 14:08
-
-
Save vinothkannans/acc2655f8e6e407b4965daf6f8e1edb1 to your computer and use it in GitHub Desktop.
taxonomy filter for Newspaper theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
source https://themeforest.net/comments/11759540