WordPress.org

Ready to get started?Download WordPress

Forums

Sorting posts by ID (3 posts)

  1. evenstar00
    Member
    Posted 6 years ago #

    Hi! I'd like to display specific posts on my homepage by ID. Something like:

    Post with ID 5

    Post with ID 1

    Post with ID 25

    I hope you get what I mean. Is it possible to do that? Hope someone can help!

  2. richarduk
    Member
    Posted 6 years ago #

    Bit of a hack, but from http://codex.wordpress.org/Template_Tags/query_posts

    Create a category e.g. index-page-posts.

    Show only the posts from that category

    Display posts from only one category ID:

    query_posts('cat=4');

    Display posts from only one category by name:

    query_posts('category_name=Staff Home');

  3. Chris_K
    Member
    Posted 6 years ago #

    There's also the Get-a-Post plugin that might help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags