There is a wordpress site with a page with a video gallery. To filter by it, use the WordPress Meta Data Filter & Taxonomies Filter - MDTF plugin in the sidebar widget. It filters everything well, the only thing that opens the resulting page is not in the form (template) that I need: enter image description here I do everything according to the recommendations of the author in the video , create my own template, specify it in the settings here - it does not help

enter image description here

I try to set the output to the same page via self - in this case I remain on the page, but the filtering itself does not occur ... I try to hack the widget filter to display the filter according to the recommendations

<?php 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]'); $args = $_REQUEST['meta_data_filter_args']; global $wp_query; $wp_query=new WP_Query($args); $_REQUEST['meta_data_filter_found_posts']=$wp_query->found_posts; } ?> 

and again does not come out. How can I fix the problem? page template itself:

 <?php /** * The left sidebar widget area. * * @package ThemeGrill * @subpackage ColorMag * @since ColorMag 1.0 */ ?> <div id="secondary"> <?php do_action( 'colormag_before_sidebar' ); ?> <?php if( is_page_template( 'page-templates/contact.php' ) ) { $sidebar = 'colormag_contact_page_sidebar'; } else { $sidebar = 'colormag_left_sidebar'; } ?> <?php if ( ! dynamic_sidebar( $sidebar ) ) : if ( $sidebar == 'colormag_contact_page_sidebar' ) { $sidebar_display = __('Contact Page', 'colormag'); } else { $sidebar_display = __('Left', 'colormag'); } the_widget( 'WP_Widget_Text', array( 'title' => __( 'Example Widget', 'colormag' ), 'text' => sprintf( __( 'This is an example widget to show how the %s Sidebar looks by default. You can add custom widgets from the %swidgets screen%s in the admin. If custom widgets are added then this will be replaced by those widgets.', 'colormag' ), $sidebar_display, current_user_can( 'edit_theme_options' ) ? '<a href="' . admin_url( 'widgets.php' ) . '">' : '', current_user_can( 'edit_theme_options' ) ? '</a>' : '' ), 'filter' => true, ), array( 'before_widget' => '<aside class="widget widget_text clearfix">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>' ) ); endif; ?> <?php 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]'); $args = $_REQUEST['meta_data_filter_args']; global $wp_query; $wp_query=new WP_Query($args); $_REQUEST['meta_data_filter_found_posts']=$wp_query->found_posts; } ?> <?php do_action( 'colormag_after_sidebar' ); ?> </div> 
  • And what do you have in the settings of the Results output page link and Results output template? - labris
  • @labris tried various combinations: 'self','' 'self','self' 'self','self' 'http://domen.com/en/mdtf-results-page/','search-template' 'self','self' search-template 'http://domen.com/en/mdtf-results-page/','search-template' etc. - does not help - Vasya
  • one
    There should be an http link to the page on your site that the plugin creates during installation, something like that. Here everything is described in detail - wp-filter.com/step-by-step-na-russkom - labris
  • @labris thanks. I understood what my plug-in is - I filter inside the shortcode, and the output in the template goes as simple content - Vasya

0