WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Exclude categories with get_recent_posts ? (3 posts)

  1. Paul
    Member
    Posted 3 years ago #

    Hello!

    This plugin is fantastic, very powerful !

    However I can't exclude categories using get_recent_posts

    Can I add a parameter to url for exclude categories with get_recent_posts ? Otherwise a change in the files but I can not find the place...

    The important thing is that I can target a category OR exclude categories with get_recent_posts.

    Thank you in advance for your reply and sorry for my English (isn't my mother tongue).

  2. dphiffer
    Member
    Plugin Author

    Posted 3 years ago #

    Hi NightAngel,

    Can you post an example of the request query? On my test environment I'm able to exclude categories with the following pattern:

    http://wordpress.test/?json=1&exclude=categories

    Thanks,
    -Dan

  3. tjhanley
    Member
    Posted 3 years ago #

    Dan, I think what he means is to exclude certain category's posts from the recent post query. For example we have some categories that are private and in the get_recent_posts query I'd like it to exclude any posts from category 10.

    Does that make sense?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags