How to display embedded video eleven40 theme

Community Forums Forums General Discussion How to display embedded video eleven40 theme

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  baconzoo 1 year, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14865

    axanthus
    Participant
    Post count: 1

    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

    #14924

    wpspeak
    Participant
    Post count: 117

    Hi 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,


    #14975

    axanthus
    Participant
    Post count: 1

    Thank 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

    #55620

    baconzoo
    Participant
    Post count: 8

    I’m going to reopen this can of worms for Eleven40 Pro:

    It seems that just dropping the YouTube URL into a post was enough. But on a mobile device the video does not shrink down to size, and it looks ridiculous.

    Example: http://billybacon.com/hd-editing-for-drift-innovation/

    Note: the top video used just the YouTube URL, and the bottom video used an iframe embed. Neither shrink down for the iPhone device.

    • This reply was modified 1 year, 2 months ago by  baconzoo.
    • This reply was modified 1 year, 2 months ago by  baconzoo.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.