• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Featured Video in Teasers

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featured Video in Teasers

This topic is: not resolved

Tagged: featured videos

  • This topic has 21 replies, 5 voices, and was last updated 8 years, 11 months ago by Brad Dalton.
Viewing 20 posts - 1 through 20 (of 22 total)
1 2 →
  • Author
    Posts
  • April 17, 2016 at 6:46 am #183771
    Nicoletta
    Member

    Hi, I'm currently building my blog with the Metro Pro Theme.

    On the home page I use teasers of my articles with featured images. But on selected articles I'd like to show a featured video instead of a featured image in the teaser. Is there a way (plug-in, code) to achieve that?

    I found the "Featured Video Plus plugin" but that doesn't appear to be working with Genesis themes.

    https://ziprett.ch/
    April 17, 2016 at 6:48 am #183772
    Brad Dalton
    Participant

    I would ask plugin support why it doesn't work with Genesis https://wordpress.org/support/plugin/featured-video-plus


    Tutorials for StudioPress Themes.

    April 17, 2016 at 7:07 am #183773
    Nicoletta
    Member

    Thanks a lot for the fast answer and for already asking the plugin support!

    I just read on the plugin support page that apparently there's a problem with WordPress 4.5, so it's also possible that that's the problem and not Genesis.

    April 18, 2016 at 10:29 am #183840
    Brad Dalton
    Participant

    Just tested it and it works in Genesis running WordPress 4.5 and also tested on development version (4.6-alpha-37231).

    Make sure you have enable featured images in Genesis > Theme Settings > Content Archives.


    Tutorials for StudioPress Themes.

    April 19, 2016 at 1:51 am #183886
    alwib
    Member

    i have some problem on my web teknik budidaya, but recently solved

    thanks you

    April 24, 2016 at 7:52 am #184319
    Nicoletta
    Member

    Did you test it with the Metro Pro Theme?

    I have featured images in content archives und for teaser posts enabled but I can't get the plugin to run. Guess I have to keep trying or find another solution.

    May 16, 2016 at 11:23 am #185714
    davidzack
    Member

    I'm having a similar issue. It looks like what should happen is, if you add a featured video, the featured image should automatically populate with a thumbnail from the video.

    I'd actually like to use the video itself in the loop instead of an image. So rather than trying to get this feature to work, is it possible to have the loop replace the image with the video if a video exists?

    May 17, 2016 at 2:19 am #185751
    Brad Dalton
    Participant

    Which loop are you referring to?


    Tutorials for StudioPress Themes.

    May 21, 2016 at 5:01 pm #186038
    Nicoletta
    Member

    @davidzack: I think we are searching for the same thing.

    I have an idea for some kind of a workaround but haven't gotten to get it to work yet. I have activated the post types in genesis and now want to change the genesis loop on the front page so that only posts with the type "video" are shown as full posts and "standard" post types are shown with an excerpt. This would allow my visitors to watch the videos directly on the front page. But this of course only works because my video posts have hardly any text anyway. Maybe this gives you some ideas :).

    June 15, 2016 at 5:41 pm #187610
    jdaviescoates
    Member

    I also have this issue. Featured Video Plus used to work fine with Genesis + Magazine Pro, but obviously some update to either WordPress and/or Genesis has broken it (although saying that, some people had these incompatibility issues years ago see e.g. https://wordpress.org/support/topic/video-only-displaying-as-screenshot although I had it working fine long after that).

    It now no longer replaces the featured image with a video, but just a thumbnail of the video.

    I'd love to get it working again so that videos are actually displayed where the featured images are normally displayed.

    Any ideas? I'm guessing adding some of their functions to functions.php would do the trick (as per https://wordpress.org/support/topic/video-only-displaying-as-screenshot#post-3606396 but I'm not exactly sure how best to do that).

    At present I have this code in my functions.php

    //* Add featured images after title on single posts and pages
    add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
    
    function single_post_featured_image() {
    	
    	if ( ! is_singular() )
    		return;
    	
    	$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    	printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    	
    }

    I guess somehow I need to add something like (as per https://wordpress.org/support/topic/video-only-displaying-as-screenshot#post-3606396 ):

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

    Could someone help me do that?

    June 15, 2016 at 5:55 pm #187612
    jdaviescoates
    Member

    I see this in an on-going issue:

    I even have been in contact with the Genesis Framework guys in order to try to enable automatic integration with their themes – sadly I haven’t been able to resolve it.

    :

    Featured Video Plus 2.0.0 (2.0.1, 2.0.2, 2.0.3)

    I think this is perhaps the first time I'm a bit annoyed that I'm using Genesis 🙁

    Why does Genesis not implement standard WordPress Featured Image stuff so things like this just work?

    June 15, 2016 at 6:00 pm #187613
    jdaviescoates
    Member

    See also this github thread:

    https://github.com/ahoereth/featured-video-plus/issues/5

    I tried some of the code there and it almost got me to where I wanted, but not quite :-/

    June 15, 2016 at 6:00 pm #187614
    Brad Dalton
    Participant

    This question relates to a 3rd party plugin which no longer seems to work. I suggest you look for another plugin which does work.

    Otherwise, you'll need custom code written.


    Tutorials for StudioPress Themes.

    June 15, 2016 at 6:11 pm #187616
    Brad Dalton
    Participant

    This works when i test it

    add_filter( 'genesis_pre_get_image', 'featured_video_plus_genesis_override', 10, 2 );
    
    function featured_video_plus_genesis_override( $output, $args ){
    
        // only act on archive featured images
        if( $args['context'] == 'archive' && function_exists('has_post_video') && has_post_video() ) {
            return the_post_video();
        } else {
            return $output;
        }
    
    }
    

    Tutorials for StudioPress Themes.

    June 15, 2016 at 6:23 pm #187618
    jdaviescoates
    Member

    Heh, it seems I had this problem before:

    Video as Featured Image

    I've not got it pretty much working as intended.

    I'd previously added this to get featured images to display on single post and pages:

    //* Add featured images after title on single posts and pages
    add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
    
    function single_post_featured_image() {
    	
    	if ( ! is_singular() )
    		return;
    	
    	$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    	printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    	
    }

    I've now removed that and replaced it with this:

    /* Code to Display Featured Image (and therefore featured video embed) on archive posts
    add_action( 'genesis_before_entry_content', 'featured_post_image', 8 );
    function featured_post_image() {
      if ( is_singular( 'archive' ) )  return;
    	the_post_thumbnail('post-image');
    }

    And have unchecked "Include the Featured Image?" in Genesis -> Theme Options

    Now I've got the featured video being displayed instead of the featured image on single posts:

    Open Value Networks

    And in archives:
    http://open.coop/category/open/

    But not on the homepage:

    Home

    Be great to get it working there too...

    June 15, 2016 at 6:28 pm #187619
    jdaviescoates
    Member

    Gah, I've just posted another long comment here (twice) and I'm not getting any moderation warnings, but it isn't appearing and when I tried to re-post it after writing it the second time it said I'd already said that...

    June 15, 2016 at 6:29 pm #187620
    jdaviescoates
    Member

    Re-trying long post without links:

    Heh, it seems I had this problem before:

    Video as Featured Image

    I've now got it pretty much working as intended.

    I'd previously added this to get featured images to display on single post and pages:

    //* Add featured images after title on single posts and pages
    add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
    
    function single_post_featured_image() {
    	
    	if ( ! is_singular() )
    		return;
    	
    	$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    	printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    	
    }

    I've now removed that and replaced it with this:

    /* Code to Display Featured Image (and therefore featured video embed) on archive posts
    add_action( 'genesis_before_entry_content', 'featured_post_image', 8 );
    function featured_post_image() {
      if ( is_singular( 'archive' ) )  return;
    	the_post_thumbnail('post-image');
    }

    And have unchecked "Include the Featured Image?" in Genesis -> Theme Options

    Now I've got the featured video being displayed instead of the featured image on single posts:
    [link removed in hope comment will post]

    And in archives:
    [link removed in hope comment will post]

    But not on the homepage:
    [link removed in hope comment will post]

    Be great to get it working there too...

    June 15, 2016 at 6:33 pm #187622
    jdaviescoates
    Member

    Brad,

    re:

    This question relates to a 3rd party plugin which no longer seems to work. I suggest you look for another plugin which does work.

    The plugin works really well, it just doesn't play well with Genesis child themes (although it has previously worked fine with them too).

    But many thanks for your code suggestion, I give that a whirl too to see what results it produces...

    June 15, 2016 at 6:40 pm #187623
    jdaviescoates
    Member

    Brad,

    Your code added the featured image to archive pages (when featured image option checkbox was selected in Genesis -> Theme Settings), but not on single posts, and even in the archives it was too small.

    For now I've just gone back to using this code:

    //* Code to Display Featured Image (and therefore featured video embed) on archive posts
    add_action( 'genesis_before_entry_content', 'featured_post_image', 8 );
    function featured_post_image() {
      if ( is_singular( 'archive' ) )  return;
    	the_post_thumbnail('post-image');
    }

    Which seems to do the trick (apart from on the homepage), but I then hack to uncheck the "Include Featured Image?" option in Genesis -> Theme Options or I end up with two featured images.

    June 15, 2016 at 7:07 pm #187630
    Brad Dalton
    Participant

    Nope. The code added the video on archives only and replaced the featured image.

    To add the video on single posts, you will need more code.

    You can also add a check for the genesis > theme settings > content archives > featured image settings using this:

    if ( is_attachment() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    		return;
    

    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 22 total)
1 2 →
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble