Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chaimsem2

    (@chaimsem2)

    gotcha, I think you’re right, I made a mistake here…Don’t think it’s to do with safe mode.

    thanks for the help!

    Thread Starter chaimsem2

    (@chaimsem2)

    I created a query for elementor like this:

    // Posts or Portfolio Widget
    add_action( 'elementor/query/my_custom_filter', function( $query ) {
    	// Modify the posts query here
            
    global $wp_query;
            $args = array(
            'category__and' => 'category', //must use category id for this field
            'tag__in' => 'post_tag', //must use tag id for this field
            'posts_per_page' => -1); //get all posts
    
    $posts = get_posts($args);
            foreach ($posts as $post) :
      //do stuff 
         endforeach;  
    
    } );

    amd then used this: my_custom_filter in elementor archives template for the site.

    • This reply was modified 4 years, 6 months ago by chaimsem2.
Viewing 2 replies - 1 through 2 (of 2 total)