• Hi there

    I have a fairly simple ‘get_posts’ query that shows a single post, but obviously it doesn’t respect sticky posts. Anyone have any solutions for how to modify this code:

    ‘global $post;
    $args = array( ‘numberposts’ => 1, ‘category’ => 174, ‘exclude’ => 184 );
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) : setup_postdata($post); ?>’

    To show a sticky (if there is one) ?

    Thanks!

  • The topic ‘get_posts including sticky’ is closed to new replies.