Assigning of 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 your… read more
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:
Sometimes users need conversion any taxonomy terms names into meta data: integer or float values. Reason: desire using range-slider for that values, but trouble in that – range-sliders works only with meta-data. So next algorithm will help you synchronize data: Create in meta constructor html-item, type: range-slider for example. Let it be filter of bpm (beats per minute) on… read more
Meta filter category ID – keeps in each post with the same name key ‘meta_data_filter_cat’. So if you want to allow your user create new posts with already predefined or selected ‘Meta filter category ID’ you are need in your wp theme functions.php add next code:
| add_action('save_post', 'my_save_post', 1); function my_save_post() { if (!empty($_POST)) { global $post; if (is_object($post)) { $meta_data_filter_cat_id = 777; //$meta_data_filter_cat_id=$_POST['meta_data_filter_cat_id']; if ($post->post_type == '__your_post_type_slug_here__') { update_post_meta('meta_data_filter_cat', $meta_data_filter_cat_id); } } } } |
Where $meta_data_filter_cat_id is predefined meta_data_filter_cat ID which of course… read more
open your site wp-content/plugins folder by ftp client, filezilla for example rename previous plugins version folder in the wp-content/plugins folder, for example as: meta-data-filter-old upload the latest version of the plugin to wp-content/plugins folder after the plugins files uploading go to the plugin settings page and press ‘Save’ button that is all…. p.s. you can always roll back to the… read more
It is simple, you can use drop-down for it as on the screen: It can be not only price-“slider” – you can create any filtration by your logic, for example it can be meters,inches, miles, etc …
There is no such functionality in shortcode, but in the widget: To resolve your task you are need modify code of the plugin: index.php -> function draw_term_childs_select -> before
| <?php if ($show_option): ?> <option <?php if ($tax_count == 0 AND ( $widget_options['taxonomies_options_show_count'] == 'true' OR $widget_options['taxonomies_options_show_count'] == 1)): ?>disabled<?php endif; ?> value="<?php echo $term_id ?>" <?php if ($selected_id == $term_id): ?>selected<?php endif; ?>> <?php _e($term['name']) ?><?php echo $tax_count_strting; ?> </option> <?php endif; ?> |
add next code
| <?php if (in_array($term_id, array(57, 63, 89, 99))) { $show_option = false; } ?> |
Where array(57,63,89,99) is term_ids which you want to exclude
You can remove any option(s) from any drop-down using JavaScript. Look on the next code please:
| <script type="text/javascript"> jQuery(function () { jQuery(".mdf_taxonomy_pa_merk .mdf_taxonomy option").each(function () { var v = jQuery(this).val(); if (v == 74 || v == 202) { jQuery(this).remove(); } }); }); </script> |
css class ‘.mdf_taxonomy_pa_color’ is container for drop-down with css class ‘mdf_taxonomy’ which makes filtration for taxonomy ‘pa_color’. In construction ‘if’ set terms ids which you want to remove. You can drop this script in your footer.php More: http://stackoverflow.com/questions/22988581/how-to-remove-all-options-from-a-dropdown-using-jquery-js… read more
100% you are trying to install Codecanyon bundle. To install the plugin you are need unpack it and you will find inside the plugins zip meta-data-filter.zip which should be installed.
From version 2.1.9 (1.1.9) customers can use plugin ‘Essential Grid WordPress Plugin’ to create very beautiful layouts for your site and make them filterable by MDTF. Download MDTF html templates from here Unzip and upload folder mdf_templates into your current wp theme Create Page in your site and drop there shortcodes like this: [mdf_results_by_ajax shortcode=”mdf_custom… read more