• holby

    (@holby)


    Hi

    I would like to make a query to only show sticky posts and nothing else. I have a mix of custom post types.

    Is this possible?

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Markus Wiesenhofer

    (@markusfroehlich)

    Hello, you can do this with the default WP Query.

    
    $posts = get_posts( array( 'post_type' => array('post', 'page'), 'post__in' => get_option( 'sticky_posts' ) ) );
    

    Best regards
    Markus

Viewing 1 replies (of 1 total)
  • The topic ‘sticky cpt query’ is closed to new replies.