WordPress.org

Ready to get started?Download WordPress

Forums

Featured Video Plus
[resolved] Video only displaying as screenshot (17 posts)

  1. AdamScheibeler
    Member
    Posted 1 year ago #

    I'm trying to use the featured pages widget with my StudioPress Corporate Genesis theme. The featured video plus plugin is obviously recognizing my video, because it displays a playable video when I look at my edit page options. However, on my home page, where I'm using the featured pages widget, it's just displaying a screenshot from the beginning of my video rather than embedding it as a playable video. I'm still relatively new to WordPress so any help would be greatly appreciated!

    Thanks

    http://wordpress.org/extend/plugins/featured-video-plus/

  2. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Ok - that's a theme based on the genesis framework which is available paid only. Therefore I cannot look into its source code.

    The problem almost certainly occurs because the theme does not use WordPress' default functions for displaying featured images (get_the_post_thumbnail and the_post_thumbnail). These functions are required for the plugin to hook into the WordPress core. I will add this to the FAQ.

    For the plugin to still display the video you need to directly implement it's functions in your code. This is how it is done roughly:

    Find the part in the framework's code where the featured image is being inserted. I guess it is in file called widgets.php or similar. There should be has_post_thumbnail or get_post_thumbnail_id used and you could search the genesis framework source files for those.

    Then the whole part which echos the featured image needs to be wrapped in a conditional which, if there is a featured video, displays this instead.

    if ( has_post_video() ) {
        the_post_video();
    } elseif ( has_post_thumbnail() ) {
        echo post_thumbnail;
    }

    This is just an example how it could look like. As I said, I have no access to the genesis source and therefore cannot give any more detailed advise.

    If you find the file which contains the required part you can post the part of interest here or send it to me and I will take a look at it. papalenefi@emaillime.com

    Regards, Alex

  3. osckar
    Member
    Posted 1 year ago #

    @Alex:

    Hi:

    I´m having the same issue with the (free) Leaf theme http://wordpress.org/extend/themes/leaf

    Could you take a look?

    Thanks!

  4. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Uhm, the leaf theme uses a slider on it's front page where the featured images are used as backgrounds. Unfortunately we cant use videos this way. To display videos instead of images it would need an completely different slider script.

    For the Corporate Theme the plugin should be much easier to implement, because the images are actually displayed as items on their own, which we should be able to replace easily.

  5. osckar
    Member
    Posted 1 year ago #

    @Alex

    Yes, the Leaf theme uses leaf_get_post_image instead of has_post_thumbnail, but I got your plugin to work on some areas with this code:

    <a href="<?php the_permalink(); ?>">
    <?php if ( has_post_video() ) {
        the_post_video();
    } elseif ( leaf_get_post_image() ) {
    ?>
    <img src="<?php echo leaf_get_post_image( '','',true,'', 'medium' ); ?>" alt="<?php the_title(); ?>" class="attachment-post-thumbnail wp-post-image">
    <?php }; ?></a>

    Though I tried to make it work on the iview slider with a medium success :/

    The original code is this:
    <a href="<?php the_permalink(); ?>" data-iview:image="<?php echo leaf_get_post_image( null,null,true,null, 'slider' ); ?>">

    I tried to use the code as the first one, but in some cases the images didn't appear or the titles got all messed up :@

    Do you have any hint on how to code that part?

    Thank you

  6. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Ok a hint would be this one: http://pastebin.com/yjc28qY8
    It displays the video, but needs some tweaking because the featured image box of leaf is just 720px*320px and so the video has no chance to fit it.

    Hope it helps, if I get an idea on how to easily make the video fit the box better I will let you know.

  7. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Version 1.3 features some better sizing options, but I was not able to fix videos displayed in the iview-slider. They just keep bugging. But I do not think it is even nice to use videos there: The player switches post every couple of seconds - the videos keep playing even when they are not in view anymore.

    @Adam Scheibler: A conditional as described in post #2 will certainly fix your problem.

  8. tokyoclock
    Member
    Posted 1 year ago #

    Hi Alex.

    I'm having the same problem in the website I'm developing.

    I'm using Striking Theme and I've noticed it uses 'blog_featured_image' instead of _has_post_thumbnail.

    I can have the video screenshot but not the embed as featured video.

    Is there any way you can help me with this?

    Thanks

  9. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    While I cannot look into the Striking Theme's source code I think the plugin should be integrate-able somehow similar.

    The theme seems to have 3 different pages where the Featured Images are being displayed: Home (slider), blog overview and single pages.
    You need to find these source files and add an conditional to where the featured images are added.

    <?php has_post_video() { the_post_video(); } else { ?>
    <?php \\ old code goes here ?>
    <?php } ?>

    I do not know how much code the blog_featured_image() function adds. the_post_video() just adds the embed, some containers which are required by the theme might be missing.

    As I said, for further support I might need to see some source files. But still, hope this already helps!
    Alex

  10. tokyoclock
    Member
    Posted 1 year ago #

    I've tried it without success...

    I've made the website locally using MAMP to emulate WP database so I'm not sure how can I send you the source files.

    Is there any way I can show you the source files?

    João

  11. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    The problem is I am not sure how the theme is licensed. I would need to get the whole theme's source files for implementing a fix and testing. According to the FAQ the theme creators provide some extensive support them self.

  12. cloakey
    Member
    Posted 1 year ago #

    Hi i am having the same issue with the lightbright theme from elegant themes.
    Please help this is a paid theme
    Thanks in advance...

  13. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Please do not post your login details here in public! I would strongly advise you to edit your post and remove them.

    I will look into your problem

  14. cloakey
    Member
    Posted 1 year ago #

    Thank you

  15. Alexander Hoereth
    Member
    Plugin Author

    Posted 1 year ago #

    Okay I edited your themes entry.php on-site:
    Old: http://nopaste.info/29713ba0e5.html
    New: http://nopaste.info/88e514cadf.html

    My changes are line 31

    <?php if(function_exists('has_post_video') && has_post_video()): the_post_video(); else: ?>

    and 84

    <?php endif; ?>

    Remember that when updating your theme these changes will get lost! So redo them afterwards. Alex

    PS: Your theme already ships with video functionality. Why don't you just rely on this as you did for some posts already?

  16. cloakey
    Member
    Posted 1 year ago #

    Thanks Alex,
    I am no longer using the video custom post type as my mobile theme doesn't support it where as it will support this.

  17. cloakey
    Member
    Posted 1 year ago #

    Thanks again it works brilliantly!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic