- License Key
- Adding Videos
- Shortcodes
- Template Files
- Template Tags
- Adding Widgets
- Changing the Permalink
- Important
License KeyBack to top
Your license key has been send to you in the Purchase Receipt email or, if you are a registered user at MonicaNDesign, you can also find it in your account.
Adding VideosBack to top
The video posts work the same way posts do, including also categories and tags. Simply add the video embed code in the main editor and add the video info in the Video Details custom metabox. Empty custom fields won't appear in the published post.
If you want more content, add it in the main editor and it will be displayed above the content outputed by the Video Details metabox.
Once the plugin is installed and the license key has been validaded, you should see a Video Vault option in your WP Dashboard:
The plugin builds upon the WordPress system, so it works just like posts do - click Add New under All Videos and fill in the details, add an image for the video... then click Publish:
You can add categories and tags to the videos, they will be separated from the posts categories and tags:
Tip: To read more about using the WordPress posts: WordPress Posts - Make some content.
ShortcodesBack to top
The following shortcodes are provided to display your content in any page/post:
[mndvideos]
By default, this shortcode will display a list of your latest videos, with pagination when applicable. It also accepts a variety of parameters:
- display
- category
- exclude_category
- tag
- exclude_tag
- relation
- number
- columns
- orderby
- order
- ids
- pagination
The display parameter accepts either list (default) or grid. The grid display outputs 3 columns by default.
The parameters category, tags, exclude_category, and exclude_tag accept a comma separated list of slugs or IDs.
Ex: [mndvideos category=32,commercials tag=comedy,photoshoot]
The relation option accepts OR (default) or AND - whether the videos displayed have to be in all the categories/tags provided, or just in at least one.
The number and columns parameters accept a numerical value. Specify the maximum number of videos you want to be displayed, as well as the number of columns. columns works only with the grid display.
Ex: [mndvideos number=7]
[mndvideos display=grid columns=4]
The orderby parameter accepts the following options: post_date (default), title, id, random, popular.
The order parameter accepts either DESC (default) or ASC.
The ids parameter accepts specific video IDs. You can specify multiple download IDs using comma separated values.
Ex: [mndvideos ids="74,76,90"]
The pagination option accepts either true (default) or false.
[mndvideo_categories]
By default, this shortcode will display an alphabetical list of the first level categories you created for your videos, including any description. It also accepts the following parameters:.
- display
- thumb
- columns
- parent
- orderby
- order
IMPORTANT: In order to add feature images to the video categories, install and activate the free WordPress plugin WP Term Images. Categories images are used with the options display=grid and thumb=true.
The display parameter accepts either list (default) or grid. The grid display outputs 3 columns by default.
The thumb parameter accepts either false (default) or true. The grid display outputs the thumbnails by default.
The columns parameter accepts a numerical value. Specify the number of columns you want to be displayed. It works only with the grid display.
Ex: [mndvideo_categories display=grid columns=5]
The parent parameter accepts specific video categories IDs and displays the sub-categories of that parent category.
Ex: [mndvideo_categories parent=32]
The orderby parameter accepts the following options: name (default), id, slug, description.
The order parameter accepts either ASC (default) or DESC.
[mndvideo_count]
The easiests way to display the number of published videos on posts and pages! No PHP plugin needed.
Ex: The video archive currently has [mndvideo_count] videos!
Deprecated
[video_categories] - deprecated, use [mndvideo_categories] instead.
This shortcode will display an alphabetical list of the first level categories you created for your videos, including any description.
[video_recent] - deprecated, use [mndvideos display=grid number=3 pagination=false] instead.
This shortcode will display the last 3 videos.
The following parameters can be used: category and tag - only one. You must use the category/tag slug.
Ex: [video_recent category="interviews"]
[video_recent tag="comedy"]
Tip: To read more about using the WordPress shortcodes: WordPress Shortcode.
Template FilesBack to top
To ensure the plugin can displays your content in optimal contitions, verify that your site's theme uses the wp_head(), body_class(), post_class(), & the_content() template tags (standard in any professional theme).
Video Page
By default, the plugin injects your content directly in the page, above any content added in the main editor. To do this, it searches your theme folder for the single-video.php file. If it isn't available, the plugin uses your theme's page.php template. If page.php also doesn't exists, it uses the single-video.php file in the plugin's template folder /mnd-video-vault/templates/.
If you want to customize the output in the video page (ex: modify the fields order):
- In your theme folder, copy the page.php file. Rename it single-video.php and open it to edit.
- In the plugin's folder /mnd-video-vault/templates/ open to edit the file single-video.php.
- From the plugin's single-video.php file copy the divider
<div class="mndvault-video-content"> ... </div><!-- .mndvault-video-content -->
and paste it in your single-video.php file below the<?php the_content(); ?>
- In your single-video.php file locate
<?php while ( have_posts() ) : the_post(); ?>
and add<?php remove_filter( 'the_content', 'mndvault_metabox_content' ); ?>
. - Save single-video.php when finished.
Video List
To display the video list and category/tags archives, the plugin uses the archive-video.php file in your theme first, or in the plugin's template folder /mnd-video-vault/templates/ second. The videos are displayed automatically when published and are sorted by the published date.
If the default template doesn't match your theme's markup, or you want to customize it:
- In your theme folder, copy the page.php file. Rename it archive-video.php and open it to edit.
- In the plugin's folder /mnd-video-vault/templates/ open to edit the file archive-video.php.
- In your archive-video.php replace
<?php the_content(); ?>
with the list from the plugin's archive-video.php file<ul class="mndvault-video-list"> ... </ul><!-- .mndvault-video-list-details -->
- Erase the following lines in your archive-video.php, they are already contained in the code from the step above
<?php while ( have_posts() ) : the_post(); ?>
<?php endwhile; ?>
- In your archive-video.php replace the title tag
<?php the_title(); ?>
with the archive title tag<?php the_archive_title(); ?>
- Save archive-video.php when finished.
Tip: To read more about using the WordPress templates files: WordPress Templates.
Template TagsBack to top
The following template tags can help you improve the visitors experience:
Video Pagination
To display a numbered pagination, simply add the following tag in the archive-video.php template:
<?php mndvault_video_pagination(); ?>
Video Navigation
To display a previous/next type of navigation between videos, simply use the following tag in the single-video.php or page.php template:
<?php mndvault_video_navigation(); ?>
Related Videos
To display a list of 3 related videos, simply use the following tag in the single-video.php or page.php template:
<?php mndvault_video_related(); ?>
Popular Videos
To display a list of the 3 most viewed videos, simply use the following tag in the single-video.php or page.php template:
<?php mndvault_video_popular(); ?>
Video Count
To display the number of videos published on your site, simply use the following tag anywhere on your site/templates/widgets:
<?php mndvault_video_count(); ?>
Ex: We currently have <?php mndvault_video_count(); ?> videos in our media library!
Tip: To read more about using the WordPress templates tags: WordPress Template Tags.
Adding WidgetsBack to top
MND Video Vault comes with 3 widgets: Latest Videos, Popular Videos, and Video Counter.
MND Latest Videos
This widget allows you to display a list of your latest published videos in a widget area. You may set the widget title, or leave it empty, and how many videos to render (up to 10). The widget outputs the thumbnail, title and date per video.
MND Popular Videos
This widget allows you to display a list of your most viewed videos in a widget area. You may set the widget title, or leave it empty, and how many videos to render (up to 10). The widget outputs the thumbnail, title and no. of views per video.
MND Video Counter
This widget enables you to display the total number of videos published on your site. You may set the widget title, or leave it empty. If you want more control over the output, you can use the video counter template tag.
If you want to use the default WordPress widgets, like Recent Posts, Categories, Search, Tag Cloud..., you'll notice they don't work with the video posts. That's because MND Video Vault is using a custom post type to organize entries, and the default widgets only work with the default post types.
Enter Custom Post Type Widgets. You can use this free plugin to add widgets, like Latest Videos, Search Videos, Video Categories and more:
Tip: To read more about using the WordPress widgets: WordPress Widgets.
Changing the PermalinkBack to top
If you want to change the videos slug in the permalinks, simply add the following code to your theme's functions.php file. Change my-slug to anything you want:
define( 'MNDVAULT_SLUG', 'my-slug' );
After doing this, you should refresh your permalink structure (instructions here) for the changes to fully take effect.
ImportantBack to top
Every time you create a new video category or tag, you need to flush the permalinks: go to Settings → Permalinks and click the button Save Changes. You don't need to make any modification.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article