WordPress.org

Ready to get started?Download WordPress

Forums

Random posts on homepage? (4 posts)

  1. itsbobtista
    Member
    Posted 5 years ago #

    Is there a way to set my homepage up to show a random post or random 2-3 posts every time you refresh? Sometimes I go a couple weeks without adding something new, and I want my homepage to show something random so that people don't keep seeing the same post on the front.

  2. tom5436
    Member
    Posted 5 years ago #

    I am looking to do the same thing with a video. I was thinking use the php rand function to create a random number that would then go into the wp_query("cat=2&post=RANDOM NUMBER HERE"); but I'm not an expert at all.

  3. hotkee
    Member
    Posted 5 years ago #

    Eherm!
    Or you could both use random posts plugin.

  4. tom5436
    Member
    Posted 5 years ago #

    Or you could both use random posts plugin.

    haha very good idea hotkee thanks

Topic Closed

This topic has been closed to new replies.

About this Topic