Support » Plugin: Linker » Query for front widget

  • I try to write a front widget, I try to get posts with this query but return
    no post found

    new WP_Query( apply_filters( 'widget_posts_args',
        ['posts_per_page' => $number,
        'no_found_rows'   => true,
        'post_status'     => 'publish',
        'post_type'       => 'linker',
        ], $instance))
    
        if ( ! $surl_query->have_posts() ) {
          echo "no post found";
        }
    
  • The topic ‘Query for front widget’ is closed to new replies.