Below is the text of the page https://wp-filter.com/howto/ stored 2017-11-08 by archive.org.ua. The original page over time could change. View as original html

How To Archive - WordPress Meta Data Filter & Taxonomies Filter

Powerful and Flexible WordPress Meta Data Filter & Taxonomies Filter. Let your clients find all things they are want with the ease on your site Subsribe on our amazing news [#] Pre-Sale Question Try it for free! Buy it on CodeCanyon! Get more tools here! WordPress Meta Data Filter & Taxonomies Filter The site main navigation Toggle navigation Home FAQ Codex Documentation MDTF Documentation How To Step-by-step Step-by-step – на Русском Video DEMO SITES Other Sites with the plugin Recommended plugins Gifts News ATTENTION!! Content of the page Archives: How To MDTF hidden utilities September 12, 2016, Updated : September 12, 2016 realmag777 The plugin has hidden area: wp-admin/edit.php?post_type=meta_data_filter&page=mdf_utilities To display it: open index.php of the plugin (near row #33) find: //require plugin_dir_path(__FILE__) . 'ext/utilities.php'; 1 //require plugin_dir_path(__FILE__) . 'ext/utilities.php'; and uncomment it (remove ‘//’ on the beginning of the string) save the file you will find useful utility there ‘Terms to meta’ which allows convert any taxonomy terms slugs or names into meta data p.s. this… read more CSS manipulations while search is going August 5, 2016, Updated : August 5, 2016 realmag777 When searching works in the redirect mode (not ajax) in tag appears CSS class ‘mdf_search_is_going ‘. This fact can help you with any manipulations with site layout while MDTF search request is going on current page. For example hide smth: CSS body.mdf_search_is_going .any_container_class{ display: none; } 1 2 3 body.mdf_search_is_going .any_container_class { display : none ; } MySQL server version for the right syntax to use near ‘OPTION SQL_BIG_SELECTS = 1 July 22, 2016, Updated : August 1, 2016 realmag777 Some times there is troubles with version of MySQL versions on your server, and its generates next error: “WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘OPTION SQL_BIG_SELECTS = 1 /* From [XXX’ at line… read more How to manipulate with terms ordering in search forms February 29, 2016, Updated : August 1, 2016 realmag777 Open functions.php of the current wp theme On the same bottom of the file drop next code: add_filter('mdf_terms_order',function($default){ return 'DESC';//ASC }); //id,name,slug,count,term_group add_filter('mdf_terms_orderby',function($default){ return 'count'; }); 1 2 3 4 5 6 7 8 add_filter ( 'mdf_terms_order' , function ( $ default ) { return 'DESC' ; //ASC } ) ; //id,name,slug,count,term_group add_filter ( 'mdf_terms_orderby' , function ( $ default ) { return 'count' ; } ) ; It is possible order terms by: id,name,slug,count,term_group One hint how to avoid incompatibilities February 25, 2016, Updated : August 1, 2016 realmag777 Sometimes when MDTF works (searching going), some plugins have conflicts with it. Lets consider an example – one customer wrote me that his ‘membership plugin’ doesn work normally when MDTF making searching, there was some issues. So I suggested simple and quick decision: open index.php of that membership plugin for example (the same for another… read more How to make searchable Enfold magazine entries February 24, 2016, Updated : August 1, 2016 realmag777 open enfold functions.php file drop on the same bottom of the file next code: add_filter('avf_magazine_entries_query', 'my_avf_magazine_entries_query', 10, 2); function my_avf_magazine_entries_query($query, $params) { if (class_exists('MetaDataFilter') AND MetaDataFilter::is_page_mdf_data()) { $_REQUEST['mdf_do_not_render_shortcode_tpl'] = true; $_REQUEST['mdf_get_query_args_only'] = true; do_shortcode('[meta_data_filter_results]'); $query = $_REQUEST['meta_data_filter_args']; } return $query; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 add_filter ( 'avf_magazine_entries_query' , 'my_avf_magazine_entries_query' , 10 , 2 ) ; function my_avf_magazine_entries_query ( $ query , $ params ) { if ( class_exists ( 'MetaDataFilter' ) AND MetaDataFilter :: is_page_mdf_data ( ) ) { $ _REQUEST [ 'mdf_do_not_render_shortcode_tpl' ] = true ; $ _REQUEST [ 'mdf_get_query_args_only' ] = true ; do_shortcode ( '[meta_data_filter_results]' ) ; $ query = $ _REQUEST [ 'meta_data_filter_args' ] ; } return $ query ; } Save the file How to set logic ‘AND’ for taxonomies terms of the same taxonomy February 23, 2016, Updated : August 2, 2016 realmag777 This works for shortcode [mdf_custom custom_id=777] with attribute ‘custom_id’ (777 is in the code below) + doesn work with dynamic recount (you can hide count by CSS) Example: http://general.wp-filter.com/category/flowers-posts/ open your current wp theme functions.php file drop there next code: //*** add_filter('mdf_custom_shortcode_query_args', 'mdf_custom_shortcode_query_args', 10, 2); function mdf_custom_shortcode_query_args($args, $custom_id) { $and_tax_relation = array('post_tag'); //https://codex.wordpress.org/WordPress_Taxonomy if ($custom_id == '777') { $args['tax_query'] = mdf_modify_tax_query($args['tax_query'], $and_tax_relation); //add_filter('mdf_dyn_tax_recount_args', 'mdf_dyn_tax_recount_args', 10, 1); } return $args; } //*** for dynamic recount add_filter('mdf_dyn_tax_recount_args', 'mdf_dyn_tax_recount_args', 10, 1); function mdf_dyn_tax_recount_args($tax_query_array) { $and_tax_relation = array('post_tag'); return mdf_modify_tax_query($tax_query_array, $and_tax_relation); } //logic of AND relations in taxonomies function mdf_modify_tax_query($tax_query_array, $and_tax_relation) { if (!empty($tax_query_array)) { foreach ($tax_query_array as $key => $value) { if (isset($value['taxonomy'])) { if (in_array($value['taxonomy'], $and_tax_relation)) { $tag_terms = $tax_query_array[$key]['terms']; if (!empty($tag_terms)) { $tag_terms_tpl = $tax_query_array[$key]; $tag_terms_tpl['terms'] = array(); unset($tax_query_array[$key]); foreach ($tag_terms as $term_id) { $tag_terms_tpl['terms'] = array($term_id); $tax_query_array[] = $tag_terms_tpl; } } } } } } return $tax_query_array; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 //*** add_filter ( 'mdf_custom_shortcode_query_args' , 'mdf_custom_shortcode_query_args' , 10 , 2 ) ; function mdf_custom_shortcode_query_args ( $ args , $ custom_id ) { $ and_tax_relation = array ( 'post_tag' ) ; //https://codex.wordpress.org/WordPress_Taxonomy if ( $ custom_id == '777' ) { $ args [ 'tax_query' ] = mdf_modify_tax_query ( $ args [ 'tax_query' ] , $ and_tax_relation ) ; //add_filter('mdf_dyn_tax_recount_args', 'mdf_dyn_tax_recount_args', 10, 1); } return $ args ; } //*** for dynamic recount add_filter ( 'mdf_dyn_tax_recount_args' , 'mdf_dyn_tax_recount_args' , 10 , 1 ) ; function mdf_dyn_tax_recount_args ( $ tax_query_array ) { $ and_tax_relation = array ( 'post_tag' ) ; return mdf_modify_tax_query ( $ tax_query_array , $ and_tax_relation ) ; } //logic of AND relations in taxonomies function mdf_modify_tax_query ( $ tax_query_array , $ and_tax_relation ) { if ( ! empty ( $ tax_query_array ) ) { foreach ( $ tax_query_array as $ key =& gt ; $ value ) { if ( isset ( $ value [ 'taxonomy' ] ) ) { if ( in_array ( $ value [ 'taxonomy' ] , $ and_tax_relation ) ) { $ tag_terms = $ tax_query_array [ $ key ] [ 'terms' ] ; if ( ! empty ( $ tag_terms ) ) { $ tag_terms_tpl = $ tax_query_array [ $ key ] ; $ tag_terms_tpl [ 'terms' ] = array ( ) ; unset ( $ tax_query_array [ $ key ] ) ; foreach ( $ tag_terms as $ term_id ) { $ tag_terms_tpl [ 'terms' ] = array ( $ term_id ) ; $ tax_query_array [ ] = $ tag_terms_tpl ; } } } } } } return $ tax_query_array ; } In the function mdf_dyn_tax_recount_args in array $and_tax_relation write your taxonomy instead ‘post_tag’ OR using comma add more another… read more How to Use Firebug in Firefox Browser December 16, 2015, Updated : August 1, 2016 realmag777 How to assign filter-category automatically December 12, 2015, Updated : August 2, 2016 realmag777 Assigning of any filter-category automatically (by code in your site) to any post type is necessary when for example a lot of posts should be added by users for example, or by any another reason. For this should be used WordPress hook save_post https://codex.wordpress.org/Plugin_API/Action_Reference/save_post Here is an example how to realize it: open functions.php file of… read more Saving filters in the constructor doesn work – Maximum filter elements in filter-section November 26, 2015, Updated : August 1, 2016 realmag777 Example: in one filter section was added 50 checkboxes, but after saving its always stay 46, looks like 46 is max for the plugin? – No, just read this please: Pages: 1 2 3 4 » Video tutorials FAQ Codex MDTF Documentation × ATTENTION!! Close × Newsletter subscription on www.PluginUs.Net Form loading ... Close Copyright © 2012 - 2017 PluginUs.Net . All rights reserved. We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Ok