Viewing 15 replies - 1 through 15 (of 67 total)
  • i have the same problem

    What I did to fix this issue was editing the replace-featured-image-with-video/pt-page-featured-video.php file

    Replace

    function add_fv_box_fields() {
        add_meta_box( 'docs_list', __( 'Featured Video', 'related-video' ), 'admin_fv_box_html', 'page', 'side' );
    }

    with

    function add_fv_box_fields() {
        add_meta_box( 'docs_list', __( 'Featured Video', 'related-video' ), 'admin_fv_box_html', 'page', 'side' );
        add_meta_box( 'docs_list', __( 'Featured Video', 'related-video' ), 'admin_fv_box_html', 'post', 'side' );
    }

    I’m not sure if it’s the right way, since it doesn’t automatically implement into my post. I have a hunch that the plugin might not be finished yet.

    So I had to fix the single.php template with the following :

    if(get_post_meta(get_the_ID(), "_related-video", true) != ''){
     echo get_post_meta(get_the_ID(), "_related-video", true);
    }else{
     the_post_thumbnail( 'main' );
    }

    Replace that with your the_post_thumbnail(‘main’) in single.php. ‘main’ could be also something else, depending on your thumbnail definitions in functions.php.

    I also have this problem (featured video showing on page but not post). What a shame, would be a great plugin if it gets fixed?

    Well if you apply my fix, it will work.

    Disagree I need your help. I tried your fix, but it keeps showing me the video on the page, but no as a thumbnail in the frontpage.

    I’m using a theme called “Gridly”.

    I think I’m doing something wrong on the “single.php”

    This is what I do with your fix:

    <div class="gridly-image">
    <?php if(get_post_meta(get_the_ID(), "_related-video", true) != ''){
    echo get_post_meta(get_the_ID(), "_related-video", true);
    }else{
    the_post_thumbnail( 'summary-image' );
    }  ?>
    </div>

    This is how it looks without your fix:

    <div class="gridly-image"><?php the_post_thumbnail( 'detail-image' ); ?></div>

    I hope you can give a hand, it’s killing me!!! Thanks you!!!

    If it looks like this without my fix, then you should change the_post_thumbnail( 'summary-image' ); to the_post_thumbnail( 'detail-image' );.

    But all my fix does is replacing the featured image in the post, with the video. No other thumbnails are effected – they will still show the featured image in the thumbnail.

    From what I’ve seen, this plugin does not have any code to actually work with the videos. It simply adds the embed code to a post, nothing more, nothing less.

    I have the same problem. Im using child theme and I dont know how to fix it with your fix “disagree“. Any Idea?

    I can confirm that the plugin dos not work for posts. (WP v.3.4.1) Would be good to hear from the developer regarding this.

    How can we solve it? :S I have the same problem, I have edited the replace-featured-image-with-video/pt-page-featured-video.php file, and now appears the box in the Post , but when I publish it… ‘NO VIDEO’, no… nothing.

    you have to add the code mentioned by @disagree to your relevant template files as well.

    Anywhere where it outputs the image thumbnails you want to replace, you need it to check if a video embed code is specified, and if it it, render that instead of the featured image. It looks like this:

    if(get_post_meta(get_the_ID(), "_related-video", true) != ''){
        echo get_post_meta(get_the_ID(), "_related-video", true);
    }else{
        the_post_thumbnail( 'main' );
    }

    Hello!
    Thank you for the fix!
    I have little to no experience with coding but the first step worked! I now have the featured image box when I go to write posts. This is quite an accomplishment for me ??

    I don’t understand the second step though. In single.php the featured image is put out like this:

    <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { /* if post has a thumbnail */ ?>
    				<?php the_post_thumbnail('post-thumb', array('class' => 'post-thumb')); ?>
    				<?php } ?>

    What exaclty do I need to do with in order to replace the featured image with a video (only if I inserted a code in the ‘featured video’ box)?

    @florence

    You can replace the code you have with this:

    <?php
    if(get_post_meta(get_the_ID(), "_related-video", true) != ''){
       // show the video embed code if there is one
        echo get_post_meta(get_the_ID(), "_related-video", true);
    }else{
       if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) {
        // show the image thumb if there is one, and the post does not have a video
        the_post_thumbnail('post-thumb', array('class' => 'post-thumb'));
       }
    }
    ?>

    Never mind! I figured it out on my own! Thanks

    Oh woops, Mikkel, I hadn’t noticed your reply. This is what I did:

    <?php if(get_post_meta(get_the_ID(), "_related-video", true) != ''){
    echo get_post_meta(get_the_ID(), "_related-video", true);
    }else{
    the_post_thumbnail( 'post-thumb' );
    }  ?>

    But yours looks better! I didn’t know how to incorporate both functions. But now I think I understand a little better. Thank you. Maybe next time I can do it without help ??

Viewing 15 replies - 1 through 15 (of 67 total)
  • The topic ‘[Plugin: Replace Featured Image with Video] Featured Video Box Missing for Posts’ is closed to new replies.