Support

Account

Home Forums Backend Issues (wp-admin) Query to only show featured posts Reply To: Query to only show featured posts

  • did a bit of reading on the WP site and figured it out

    function get_staff( ){
    // Return the staff
    return get_posts(array(
    “post_type” => “staff”,
    “posts_per_page” => 10,
    “post_status” => “publish”,
    ‘meta_query’ => array(
    array(
    “key” => “featured”,
    “value” => “1”,
    )
    )
    ));
    }