• A very nice plugin enabling without further ado a functionality that should have been native.

    If you’re actively using the sticky post functionality for CPTs, it might be tricky to use some queries. For example, this will not work

    
    $featured_post_args = array(
      'post_type'           => 'custom_post',
      'posts_per_page'      => 1,
      'post__in'            => get_option( 'sticky_posts' ),
      'ignore_sticky_posts' => 1
    );
    

    and you need to use something like

    
    array_filter(get_option( 'sticky_posts' ), function($id) {
      return get_post_type($id) == 'custom_post' && get_post_status($id) == 'publish';
    });
    

    But this is a problem of WP itself and not of the plugin.

    • This topic was modified 6 years, 10 months ago by certainlyakey.
  • The topic ‘Another should-have-been-there feature’ is closed to new replies.