WordPress.org

Ready to get started?Download WordPress

Forums

random header images per page or post possible? (5 posts)

  1. jojojovich
    Member
    Posted 1 year ago #

    Is it possible to set up random images to appear on one or several page/s or post/s, versus to appear across the whole site?

    And if that is possible, will doing so disable the "Featured Image" capability for that page or post? (or would setting a Featured Img override the random images?)

    I saw this on another post that is closed, which did not explain how to do this: "Twenty eleven allows for the choice of 1 image to repeat per page, or for random images to appear per page."

    Thanks so much!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    That was in reference to different header images. The theme uses an appropriately sized featured image as the header image on the single post page.

  3. jojojovich
    Member
    Posted 1 year ago #

    I think I hear you explaining that the post where this was mentioned by a reader, was referring to header images, which is what I am referring to also and is mentioned in the subject line here. The distinctive word he used was "random", and that's what I'm curious about.

    My original question is how to set my images to appear as the random header images just on particular pages, or posts?

    And if I set that up, whether later adding a Featured Image to any of those particular pages would use that Featured Image, or if that page/post would persist in using the random image/s set up for it?

    Hope I'm being clear! Thanks so much. :)

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    I've not come across a theme that uses random featured images. If you just want a random header images from a preset section of images, again that's an option in Twenty Ten as part of its twentyten_setup() in functions.php, Have a look at that function - specifically register_default_headers().

  5. jojojovich
    Member
    Posted 1 year ago #

    Hm, I thought it might be an adjustment you could make in the functions.php file as I've seen is possible for site headers across a site (replacing the random images which accompany twenty-eleven, for example), but instead relegated to particular pages or posts. I feel like, if I were a php expert, it could be done, which is what I was hoping to hear from with this query.

    Thanks for your observations re any themes doing this though, that is useful information also. :)

Topic Closed

This topic has been closed to new replies.

About this Topic