Using wrapper="div" to separate posts?
-
I’ve managed to get this shortcode to display my ten most recent posts using this:
[display-posts include_content="true" posts_per_page="10" image_size="thumbnail" wrapper="div"]
…but the text all wraps around any images in the posts. If post 1 has some text and an image, I’d like the text of post 2 to not wrap around post 1’s image, but start underneath it (maybe even with an<hr>
between them). I could probably achieve this using<div style="clear:both">
, but I’m not sure how to get this into the shortcode. Should I create a div style in my style.css file? How would that look in the shortcode? Or do I need to do something along the lines of this chunk of code:
https://www.billerickson.net/code/display-posts-shortcode-outer-markup/
…and if so, where does that go? In my theme’s functions.php perhaps?Thanks in advance for any suggestions!
– Paul
https://www.ads-software.com/plugins/display-posts-shortcode/
- The topic ‘Using wrapper="div" to separate posts?’ is closed to new replies.