How to add DIV to output?
-
Please direct me to how to add divs around the “date” “title” “excerpt”. I thought it would be easy to add the div as seen below but that didn’t work.
Here is the code I am adding to the functions.php:
function display_posts_order( $output, $atts, $image, $date, $title, $excerpt, $inner_wrapper ) { // Now let's rebuild the output. $output = '<' . $inner_wrapper . ' class="listing-item">' . $image . '<div class="post-content">' . $date . $title . $excerpt . '</div>' '</' . $inner_wrapper . '>'; // Finally we'll return the modified output return $output; } add_filter( 'display_posts_shortcode_output', 'display_posts_order', 10, 7 );
Thanks!
https://www.ads-software.com/plugins/display-posts-shortcode/
- The topic ‘How to add DIV to output?’ is closed to new replies.