Shortcode for single video (7 posts)

  1. ZeroGravity
    Posted 3 years ago #

    Is it possible to use the shortcode to embed a single video in a page/post? This is a feature I would love to see.

    I have a page showing a gallery of videos but would like to embed individual videos in posts. I want a little more control then the WordPress default embed offers and would prefer not to use yet another plugin.

    Many Thanks


  2. mrmatarazzo
    Posted 3 years ago #

    Yes, it is. You need to create Categories and place the video(s) you want displayed on any particular page in that category. You can then edit the short code to only include a specific category (instead of the default "all").

    Default Short Code: [myvideogall:events]
    "Filtered" Short Code: [myvideogall:category_name]

    FYI, I originally used a 2-word category name and could not get the short code to work with two words, even when in quotes. Don't know if there's another way, but I'm just using single word names for my categories, now.

  3. bryanshipley
    Posted 3 years ago #

    Two word category names work when you don't use _ to separate them. Just type them into the shortcode as they are with regular spaces.

  4. ZeroGravity
    Posted 3 years ago #

    I think you misunderstood me. I would like to display a single video in a post, not a complete category. Creating a category for each video would mean I couldn't display a group of videos that would be formatted nicely.

  5. mrmatarazzo
    Posted 3 years ago #

    Well, you're asking for two different things, now. You want to (A) display a single video in a single post and, (B) a page that displays multiple videos (a gallery).

    You can keep the gallery as-is, if you're happy with how that looks. But you would have to create new categories with the individual videos to display single videos in a post.

    I know it doesn't sound very efficient, but MyVideoGall is designed to be a gallery (Gall), so you have to present your videos in galleries, even if it's just a gallery of one.

    You may want to search for a plug-in that allows you to "tag" videos with something that could be filtered on - or even something that allows multiple tags, but I'm not aware of MyVideoGall having that capability.

  6. Maurizio Spicuglia
    Posted 2 years ago #

    hi, if i want to use shortcode in a page template? not from dashboard but inside the php file?

    in my home.php i write

    <?php echo do_shortcode("[myvideogall:all]"); ?>

    but when loading site i see the text "[myvideogall:all]" so the shortcode not work.. any solutions?

  7. Nick
    Plugin Author

    Posted 2 years ago #

    You can put something like this

    <?php echo videogall_display_videos("all"); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • VideoGall
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.