as the topic says i wish to keep a post not on top but in second position so that new posts are on top while one of my choice will be just after the latest. Is that possible, can't find a plugin that does it. Edit: I have posts on frontpage 1 by 1 below each other, like a google search result, i want a 'featured' post to stick always below the new/first post which is on top of the homepage. The sticky one shall remain always below the first on top which is at the same time the latest post.
-
This could be done using 'WP Sticky' posts and purely just CSS in some instances, it would really depend on how your posts are displayed. Could also be done with JS by grabbing the first two posts loaded, then re-appending them to the parent container. You could use WP categories and make a category called 'featured', pull the 1st post fromit, then run your query but count the iterations as each post loads into the loop, when the count = 1 (because PHP will start counting from 0), you first add the 'featured post' and then add the post, the rest of your posts will then just load normally.– Tony DjukicCommented Mar 5, 2022 at 0:02
-
In short, yes, it can be done, but to give you a proper answer that you can accept, you'd need to include what you're working with. I've done exactly this for the purpose of placing ads into a grid of posts. But whether or not it would work for you is entirely dependent on what you're working with, how the page where this is happening is being built, etc.– Tony DjukicCommented Mar 5, 2022 at 0:04
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.– Community BotCommented Mar 5, 2022 at 0:05
Add a comment
|