Randomizing Images
-
Hey there…
I’m trying to make the header images from 6 blog posts randomize on my main page…
It’s a photography website and I noticed that the header image for the “Portraits” post randomizes but that’s not happening for the other posts… I’ve been trying to find the difference in setting between the “Portraits” post/gallery and other posts/galleries but no luck…
And the only instructions that I see for this in the forum involve a “randomize header image” command that I can’t seem to find…
Any help? Please?
Thank you, all!
RicThe blog I need help with is: (visible only to logged in users)
-
Please see https://wordpress.com/theme/cubic
“Meet Cubic, a single-column, grid-based theme with large featured images, perfect for photoblogging. … Featured Images are 2000 wide by 1500 high.”
It does not have custom header images as a feature.
-
Hey Timethief, thanks for the response…
I had actually gone through the Cubic theme description already…
The part that isn’t making sense to me is that the “Portraits” header images *are randomizing and the ones in the other postings/galleries are not…
So based on that I feel like it’s possible to do what I’m trying to do…
-
I see what you mean! Every time I refresh your homepage, a different image is being displayed in the grid for Portraits. Let me dig into this to see if I can figure out what’s happening. I’ll keep you posted.
-
-
Ric – looks you’ve accidentally discovered a feature we’d never even thought of. :) To explain what’s happening, I first need to explain how Cubic decides which images to display in the grid on the blog page.
Cubic pulls out an image by looking to see if any of these are available, in this order:
- Cubic first looks to see if a post has a manually set featured image. (You have none of these on your posts.) If there is one, it’s displayed on the blog.
- If a post has no manually set featured image, Cubic next looks for the first image “attached” to a post. You can view image attachment in the WP Media Library here: https://ricurrutiaphotography.wordpress.com/wp-admin/upload.php Switch to “list” view – this gives you a way to see which images are attached to which posts: https://cloudup.com/c_3hWRpA_fA
- If a post has no attached images Cubic will pull out the first image in the gallery, and display that in the blog grid. This is the case for your “Portraits” post.
So, now the big mystery – why is Portraits displaying a random image from the gallery? Well, this is because you’ve set the gallery itself to randomize! So every time you refresh the page, the gallery is displaying a different image first, and that image is the one being pulled out and displayed on the blog grid.
So… if you would like your other posts to be displayed in the same way, they need to meet two conditions:
- The gallery needs to be set to randomize, AND
- The post cannot have any attached images. To unattach images from the posts, head to https://ricurrutiaphotography.wordpress.com/wp-admin/upload.php and click “Detach” next to each gallery image.
To prevent having to go through this detaching process for new posts, what you can do is upload your images to the Media Library first, and in a second step, create the galleries within your posts. That should prevent the images from becoming attached to a post.
Let me know if this is all clear — and congrats on discovering a cool undocumented feature. ;-)
-
Kathryn, thank you so much! Problem solved!!!
Have a great weekend…
Thanks again,
Ric: )
-
-
Hey Kathryn,
I was wondering if you could help me out again…
I seem to be locked out of my wordpress site… I keep requesting the password (or to do a password change) and wordpress says it's sending it to me but it's sending it to (email visible only to moderators and staff)… and I'm not sure if i'm set up to receive emails at that address right now…
Would you be able to offer any help on this?
Thank you either way,
Hope you're well,
Ric -
-
The ric@ address you mentioned is the owner (administrator) of this account, so you’ll need to change the admin email in your account settings if you want to receive emails elsewhere instead:
If you need further help with that, please contact support by email or live chat – thanks!
- The topic ‘Randomizing Images’ is closed to new replies.