• I’ve got an RSS feed of related articles coming to my site which is great, but I’d like to have a single post that stays at the top of the home page. How do I do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can someone help in this regards? same issue

    Depends a lot on what exactly you want to do. What kind of post? Just the latest post? Or a specific post from the database? What code is used to pull the RSS feed?

    Generally speaking, you want to do a loop that queries only one post, for example query_posts(“showposts=1”, display that post with the_content(). And then get and display the RSS feed. But without knowing what your Loop looks like it’s impossible to make specific suggestions.

    Mine does not have any RSS Feeds

    I have lots of posts.. But basically want only 1 post to be on top of the page.. and rest new posts to come under it..

    U can assume like an announcement/important/notice post which I want on top and everyone sees that as the 1st post when they come to the website..

    Do you know exactly which post you want to display first? Create multiple loops for your blog page. In the first one, do a hardcoded query the post that you want to come first and display it with the_content.

    Then create a 2nd loop that does the regular thing of pulling the fist x posts from the database and displays it.

    https://codex.www.ads-software.com/The_Loop#Multiple_Loops
    https://codex.www.ads-software.com/Template_Tags/query_posts#Retrieve_a_Particular_Post

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to keep a post at top of homepage?’ is closed to new replies.