Showing Images in Recent Posts Widget
-
Hi! I’d like each post title in my Recent Posts widget to display the post image or featured image right above it. May I have the CSS for that?
Thanks.
The blog I need help with is: (visible only to logged in users)
-
We don’t need CSS for this. In fact we can’t achieve this using CSS.
Add the following Display Posts Shortcode to a Text Widget and see if you got the intended result:
[display-posts image_size="thumbnail"] -
Hi! I didn’t get the intended result. I saw a list of about 10 post titles. Also, I don’t want to show that many.
-
[display-posts image_size="thumbnail" posts_per_page="5"]This short code displays 5 recent posts withe their thumbnail sized featured image, if the post has one. So please ensure your recent 5 posts have featured image set.
-
Let me try that. I have images within the post. Thanks for your help and patience, staff-happychia. I’ll let you know if it works.
-
It worked, except for a post that has a PNG image. Is there any way I can get the image left-aligned, or above the headline?
-
The display posts shortcode only shows the featured images. Not the images in the post body.
Image alignment is available only when shortcode is used in the pages.
-
Yes, I discovered that and had to make those images featured.
Thanks for all your help. Much appreciated.
- The topic ‘Showing Images in Recent Posts Widget’ is closed to new replies.