• I have a multisite.

    Blog_Id 1 has a CPT and i defined a Global Widget which uses 3 Posts widget with ELE custom skin.

    Each posts has a filtered query.

    Here an example

    add_action( 'elementor/query/sponsors_gold_query_filter', function( $query ) {
    
    	$taxquery = array(
            array(
                'taxonomy' => 'global-partner-category',
                'field' => 'id',
                'terms' => array( 59 ),
                'operator'=> 'IN'
            )
        );
    
        $query->set( 'tax_query', $taxquery );
    
    } );

    I have Gold, Silver and Bronze.

    I saved the widget as global, so i have a shortcode
    [elementor-template id="31450"]

    I created this shortcode

    
    	
    function dds_global_partners_widget()
    {
        switch_to_blog(1);
        $output =  do_shortcode('[elementor-template id="31450"]');
        restore_current_blog();
    	return $output;
        
    }
    add_shortcode('dds_global_partners_widget', 'dds_global_partners_widget');
    

    So in a subsite i call the widget with a Shortcode widget.

    Problem is that the queryfilter doesn’t kick in, so i see the partners (CPT) not filtered by taxonomy (gold, silver, bronze)

    WHY??

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Global Widget on Subsite with query filter doesn’t work’ is closed to new replies.