Make it usable with images to display random pictures.
-
Solution:
Make 2 images in an image-editor and make sure they all have the same “width” and “height” and fits in the Widget area of your homepage.
Upload the 2 images to your WordPress “Media” library, in the same way you do with you other images.
Create a new post (or page). Insert the 2 uploaded images from your “Media” library.
Switch you editor mode to see the code.
Copy the code of the first image and insert it in “Randomize” by clicking the “Add New” button in the field “Text To Display”. Name the new “Category” to “Image”. And click “Save Changes”.
Copy the code of the second image and insert it in “Randomize” by clicking the “Add New” button in the field “Text To Display”. Choose the “Category” you just made called “Image”. And click “Save Changes”.
In “Randomize” you have now a record something like this:
<p style="text-align: left;"><img class="aligncenter wp-image-4057 size-full" title="Logo 1" src="https://www.yourdomain.com/wp-content/uploads/2015/05/logoimage1_128x160.jpg" alt="Logo 1" width="128" height="160" /></p>
and a record something like this:
<p style="text-align: left;"><img class="aligncenter wp-image-4043 size-full" title="Logo 2" src="https://www.yourdomain.com/wp-content/uploads/2015/05/logoimage2_128x160.jpg" alt="Logo 2" width="128" height="160" /></p>
You can now delete your new post (or page). It was only made in order to get the code for the image files.
Make a new Widget of type text. Insert this:
[randomize category="Image"]
in the Widget text-area. And click “Save”.You can add more images in the same way if you like.
.
- The topic ‘Make it usable with images to display random pictures.’ is closed to new replies.