Pinned post support
See original GitHub issueContent editors should be able to pin a blog post using the WordPress editor
In WordPress this feature is called “Sticky”
I’ve gone ahead and made the post with slug i-love-you-buddy
sticky. If you look in the JSON response, the post that’s sticky has an attribute of sticky: true
.
http://54.243.240.9/wp-json/wp/v2/posts
You can make multiple posts sticky.
We probably will want to find the posts that are sticky within the posts array, pull them out, and append them to the top of the posts list when rendering them to the page
We should additionally add some kind of icon to identify a sticky post. Maybe a pin icon? I’m open to suggestions. The project includes react-icons
and currently makes use of Font Awesome. We should use an icon that matches that style.
Questions
- Should the “sticky” posts show twice? Once at the top and once in it’s natural location? How does Twitter handle pinned Tweets? What does a typical WP site do?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
awesome 💪 thanks @GuilleAngulo
Great! I will pay attention