Support » Plugin: Featured Galleries » Video in features gallery

  • Resolved zhuraavl


    Hi. Thank you for the great plugin.
    Please tell me the solution so that I can insert a video into your gallery.
    I don’t know how to program, but I need to do something like this

    $galleryArray = get_post_gallery_ids(); 
      foreach ( $galleryArray as $id ) {
          echo '<img src="' . wp_get_attachment_url( $id ) .'">';
      if has video
          echo '<video autoplay="" loop="" muted="" poster="wp_get_attachment_url video first frame( $id )" width="" height="">';
          echo '<source src="' . wp_get_attachment_url video( $id ) . '" type="video/mp4">';
          echo '</video>';

    thank you
    I hope it’s possible.

Viewing 1 replies (of 1 total)
  • Plugin Author Andy Mercer


    Hi there!

    I did some investigation and currently, it’s not possible to even select videos to be added to the featured gallery.

    I’ve been thinking about this and my opinion is that that is the correct behavior. The problem lies with the HMTL output. FG stores attachment IDs, and then retrieves them. There is no information stored about type of attachment (image vs video). The HTML will need to be different for a video, vs an image.

    It boils down to this plugin isn’t really the best tool for handling videos, and currently, the answer to your question is that it isn’t possible; I’m sorry.

Viewing 1 replies (of 1 total)
  • The topic ‘Video in features gallery’ is closed to new replies.