Thank you very much nobita it works really well! I have one more question left which I don’t know can you answer but I will ask since you seem to know everything so far.
How can I show an embedded video using the display posts? Currently if I put a link in the post and use the shortcode to show full content, it just copies the link, not the video.
I looked through the support for that plugin and I found an older post where the plugin creator said a filter should be added to functions.php:
/
add_filter( 'display_posts_shortcode_output', 'be_display_posts_full_content', 4, 7 );
function be_display_posts_full_content( $output, $atts, $image, $title, $date, $excerpt, $inner_wrapper ) {
// See if 'full_content' is set in shortcode.
// Ex: [display-posts full_content="true"]
if ( isset( $atts['full_content'] ) && "true" == $atts['full_content'] )
$excerpt = '<div class="listing-content">' . get_the_content() . '</div>';
// Now let's rebuild the output. Only the excerpt changed so we're using the original $image, $title, and $date
$output = '<' . $inner_wrapper . ' class="listing-item">' . $image . $title . $date . $excerpt . '</' . $inner_wrapper . '>';
// Finally we'll return the modified output
return $output;
}
Using this and then posting [display-posts full_content=”true”] doesn’t show the embedded video, do you maybe know how can I do that?