WordPress.org

Ready to get started?Download WordPress

Forums

Leaf
Video in slider (4 posts)

  1. osckar
    Member
    Posted 1 year ago #

    Hi:

    How to include a video as the featured content of the slider instead of an image? As in the iview slider demo at http://iprodev.com/iview/index.html ?

    Thank you

  2. bradthomas127
    Member
    Theme Author

    Posted 1 year ago #

    @osckar - You would have to rebuild the ivew slider in your child theme.
    I only used the bits and peaces i needed from the responsive ivew slider

  3. osckar
    Member
    Posted 1 year ago #

    Hi:

    ok, thanks!

  4. osckar
    Member
    Posted 1 year ago #

    Hi:

    Just to share something:

    It's possible to add a video to play instead of an image in home, you need this plugin http://wordpress.org/extend/plugins/featured-video-plus/

    I Just modified some code on the home.php file. For example, if you want to show a video on the article in Featured Section, all you need is to:

    Search for this:

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

    and replace it 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>

    The same can be applied to the main article of the Categories Section.

    Of course, it's better if you do it with a child theme ;)

    Though I tried to add it to the slider, but no success yet :P

    Hope you can help,

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic