Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter snowbelly

    (@snowbelly)

    Thread Starter snowbelly

    (@snowbelly)

    Okay, I’m back again – found everything on that list except the custom post type parameter. Can it be passed?

    Plugin Author Luca Grandicelli

    (@lgrandicelli)

    // Filter post by Custom Post Type (default: none)
    ‘custom_post_type’ => comma separated list of custom post types

    Thread Starter snowbelly

    (@snowbelly)

    Gave it a try, but it still returns all posts, not just my custom post type. Does this look right to you?

    $sp_args = array( ‘custom_post_type’ => ‘article_type’, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’ );

    special_recent_posts($sp_args);

    Thread Starter snowbelly

    (@snowbelly)

    Just tried it with only the “custom_post_type” parameter and it still returns all posts. ??

    Thread Starter snowbelly

    (@snowbelly)

    I think I have solved it – I must be using an older version of the plugin, the parameter it wanted was srp_custom_post_type_option. Then it worked!

    Plugin Author Luca Grandicelli

    (@lgrandicelli)

    @snowbelly So you are trying to filter posts by a ustom post type called “article_type” and this works only in the prior versions of the plugin? If you put a wrong custom post type in the relative field it should not return all posts but none.

    I’ve just tried by myself to do some filtering and it works.
    What are the versions you used to do this test?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using the special_recent_posts PHP call with custom post type’ is closed to new replies.