You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the default API doesn't offer a built-in parameter for filtering by categories (like it does for example to only show published items), you can do this with if/else statements in PHP.
For example, if you were using PHP to post a list of blogs with a link and title, you can use if/else statement to exclude particular categories. In the below example i'm blocking anything in the "General" category, but you can add more qualifiers or modify the logic to only match particular categories.
I want to be able to display all the posts on my home page, as it works normally, but filter out posts that are of specified categories.
I haven't figured out exactly how to modify the code to accommodate this—any tips?
I've seen there is an Unlisted feature coming in 4.0, but am hoping to come up with a solution in the meantime.
VERSION:
3.15.0
Thanks!
Tony
The text was updated successfully, but these errors were encountered: