0

I'm trying to use the Wordpress API (version 1 - not the new Rest API) to retrieve blog posts from various sites. However, I noticed that it was not retrieving the "featured" posts, only normal ones.

The API call I am using is: https://public-api.wordpress.com/rest/v1/sites/$site/posts

Is there a way to retrieve all the posts (normal and featured)?
Thank you!

7
  • Is it posts that are tagged or categorized as 'featured'? That might help you to use the tag or categorize options on the api Commented Oct 10, 2017 at 14:27
  • Thank you for the response! I looked into this more, but I don't think it is either one. It's a yes/no option when creating the post: "Stick to the front page."
    – Aileen
    Commented Oct 10, 2017 at 18:51
  • I think I found it here developer.wordpress.com/docs/api/1/get/sites/%24site/posts under the 'sticky' option. Commented Oct 11, 2017 at 7:23
  • Thank you so much, I will try that!!! Was looking around there, but I guess my mind was so set on "featured posts" that I didn't notice.
    – Aileen
    Commented Oct 11, 2017 at 7:39
  • No problem, let me know if that works so I can add an answer for the the next person who is looking for a solution :) Commented Oct 11, 2017 at 7:47

1 Answer 1

0

User tried and confirmed to be working

https://developer.wordpress.com/docs/api/1/get/sites/%24site/posts/

There's a Query Parameter called 'sticky'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.