Community Forums › Forums › General Discussion › How to display embedded video eleven40 theme
This topic contains 2 replies, has 2 voices, and was last updated by axanthus 3 months, 3 weeks ago.
-
AuthorPosts
-
January 25, 2013 at 5:16 pm #14865
Hello, I’m using the eleven40 theme and having an issue displaying embedded youtube videos.
On the homepage, I just have the latest posts displayed. I made the following changes to home.php:
if ( function_exists( ‘genesis_grid_loop’ ) ) {
genesis_grid_loop( array(
‘features’ => 20, // changed from 1 to 20
‘feature_image_size’ => 1, // changed from 0 to 1
‘feature_image_class’ => ‘alignleft post-image’,
‘feature_content_limit’ => 200, // changed from 0 to 200
‘grid_image_size’ => ‘grid-thumbnail’,
‘grid_image_class’ => ‘alignnone’,
‘grid_content_limit’ => 250,
‘more’ => __( ‘[Continue reading]‘, ‘genesis’ ),
) );
} else {
genesis_standard_loop();
}Before I made these changes the embedded video displayed just fine without having to open up the post, but it also showed the entire content of all any post. I made these changes to home.php to shorten the excerpt and to automatically display the first uploaded image, but now it doesn’t show the video unless the post is opened up.
Any suggestions on how to keep these settings and display the embedded video without having to open up the post?
Website in development is http://theanthropod.com The second post, “gifs with sound” has an embedded video, for an example.
Thanks!
A
January 25, 2013 at 7:20 pm #14924Hi axanthus,
I can see this:
‘feature_content_limit’ => 200,You need to change it back to
‘feature_content_limit’ => 0,Well, you said
but it also showed the entire content of all any post.
Well, I can see you set the feature post to be 20:
‘features’ => 20,You need to change it to:
‘features’ => 1,… so only the first post will be the feature post, and will be full post at homepage.
To change the limit of the excerpt, you need to change this line
‘grid_content_limit’ => 250,
January 26, 2013 at 3:50 am #14975Thank you WPSPEAK, but setting everything back to default doesn’t fix my issue. The embedded videos still don’t show up in non-featured posts.
The setting that messes up the video display for the featured posts is:
‘feature_content_limit’ => 200
I guess when the characters are limited it strips all of the HTML out of the post, like an excerpt.
After trying many different things, I finally found a Genesis filter at WP Smith that works like a charm to allow selected HTML tags in the content while still keeping the characters limited:
add_filter(‘get_the_content_limit_allowedtags’, ‘get_the_content_limit_custom_allowedtags’);
function get_the_content_limit_custom_allowedtags() {
return ‘<iframe><script>,<style>,<b>,<br>,<em>’;
}Anyone else with this issue, this solution works well.
Thanks,
A -
AuthorPosts
You must be logged in to reply to this topic.