Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #366684

    Hi,

    I’d like to have posts open a video in a lightbox from the blog page (as opposed to when you go to the single post and then watch the video). The shortcode generator gave me the following:

    [av_image src='https://maastricht-students.com/wp-content/uploads/2014/12/MixandMingle.jpg' attachment='14123' attachment_size='full' align='center' animation='no-animation' link='lightbox' target='https://www.youtube.com/watch?v=WpmoN7eDBEQ' styling='' caption='' font_size='' appearance=''][/av_image]

    Which I then inserted into the Excerpt portion of the post. But this shortcode works neither in the regular post body nor in the excerpt section.

    Any advice?

    Also, does Enfold support Post types, as I see Video is one of these. But the post type seems to have no effect on the format of the posts.

    Thanks, Atticus

    #366882

    Hi maastrichtuniversity!

    Yes Enfold supports post types. If you select the video post format and then insert the video into your post then it will be displayed in the blog page. Go ahead and try it out and let us know if that works for you.

    Regards,
    Elliott

    #368365

    Hi,

    Thanks for your reply. What I’m wondering, though, is can you open the video in a lightbox directly from the Blog page, without having to go to the individual post? So you go to the blog page and see a list of blog, some of which are normal blogs and other are videos, and upon clicking a video post the video opens directly in a light box.

    Do you know what I mean?

    Many thanks, Atticus

    #368604

    Hi!

    Open up /enfold/includes/loop-index.php and on line 89 you should see this.

    //echo preview image
    

    Add this right above it.

    if ( get_post_meta( get_the_ID(), 'enfold_custom_video_url', true ) ) { $slider = '<a href="'.get_post_meta( get_the_ID(), 'enfold_custom_video_url', true ).'" rel = "lightbox" title="'.$featured_img_desc.'">'.$slider.'</a>'; }
    

    And then for your regular posts (not post formats) create a new custom field with a name of “enfold_custom_video_url” and a value of the URL to your video.

    Best regards,
    Elliott

    #368815

    Hi Elliott,

    Oh, so it isn’t possible out of box? OK, no worries. and Thanks.

    Atticus

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Having videos open in light box from blog page…’ is closed to new replies.