WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] custom loop with a sticky post (3 posts)

  1. navigadget
    Member
    Posted 7 years ago #

    How can I (without using a plug-in) change the loop so that I can always show a post with a certain ID on top, and then continue with the regular loop?

    I tried some stuff in the index.php but no luck yet. I know it is simple but don't have too much experience using variables inside/outside the loop yet.

  2. moshu
    Member
    Posted 7 years ago #

    Will it be always the same post? If yes:
    http://guff.szub.net/2005/01/27/get-a-post/ (no way there is an easier way without a plugin)

    Or, if you want different posts at different times...
    look for a sticky, adhesive or similar plugins.

    What's wrong with plugins?

  3. navigadget
    Member
    Posted 7 years ago #

    I thought I could do it with a few lines of code so didn't want to install a whole other plug-in. But oh well, get-a-post worked really well. So I used it.

Topic Closed

This topic has been closed to new replies.

About this Topic