Skip to main content

Overview

Visual Portfolio supports video and audio content types, allowing you to create multimedia portfolios with YouTube, Vimeo, self-hosted videos, and audio files. Content can be displayed inline or in lightbox popups.

Post Format Support

The plugin uses WordPress post formats to identify video and audio content:

Video Format Configuration

Adding Video URL to Posts

Video URLs are stored in post meta:

Meta Box for Video URL

The plugin adds a meta box to posts with video format:

Supported Video Sources

YouTube

Vimeo

Self-Hosted Videos

Supported Formats

  • MP4 (H.264)
  • WebM
  • OGG/OGV

Video Popup Implementation

Video popup data is rendered in a hidden template:

Video Data Structure

Format Detection and Icons

Icon Templates

The plugin includes icon templates for different media types:

Format-Based Icons

Video URL Processing

Retrieving Video URL

Adding Video to Item Data

Format-Specific Image Handling

Audio Format Support

While the code shows audio format detection in icons and format switches, audio implementation follows similar patterns to video:

Audio File Support

  • MP3
  • WAV
  • OGG

Audio Players

  • WordPress native audio player
  • Custom audio player via popup
  • Embedded audio services (SoundCloud, etc.)

Click Actions

Configure what happens when users click portfolio items:
  • popup_gallery: Open in lightbox
  • url: Navigate to URL
  • false: No action

Video in Popup

When video format is detected with popup action:

Supported Lightbox Plugins

PhotoSwipe

Default lightbox with video support

Fancybox

Video Player in Lightbox

  • YouTube/Vimeo: Embedded iframe player
  • Self-hosted: HTML5 video player
  • Audio: HTML5 audio player

Video Poster Images

The featured image serves as the video poster:

Lazy Loading Posters

Poster images benefit from lazy loading:

Custom Video Sources

Adding Custom Video Providers

Responsive Video Embedding

Videos automatically adapt to container width:

Video Performance Optimization

Lazy Loading Videos

Thumbnail Optimization

  • Use optimized poster images
  • Lazy load poster images
  • Generate multiple sizes for responsive images

Hooks and Filters

Modify Video URL

Customize Video Popup

Change Video Icon

Examples

Video Portfolio with Filters

Self-Hosted Video

Best Practices

  • Use appropriate resolution (1080p for most cases)
  • Optimize file size for web delivery
  • Provide multiple formats (MP4, WebM)
  • Use poster images to reduce bandwidth
  • Always include poster images
  • Provide clear play button indicators
  • Ensure videos are responsive
  • Test playback on mobile devices
  • Lazy load video thumbnails
  • Don’t autoplay videos
  • Use CDN for video hosting
  • Consider YouTube/Vimeo for large videos
  • Provide video transcripts
  • Include captions/subtitles
  • Use descriptive titles
  • Ensure keyboard navigation works

Troubleshooting

Video Not Playing in Popup

Check:
  1. Video URL is correctly formatted
  2. Video is publicly accessible
  3. Lightbox plugin is active
  4. Browser console for JavaScript errors

Poster Image Not Showing

Solution:

Videos Not Responsive

Add CSS: