Elementor
Visual Portfolio includes a dedicated Elementor widget with automatic conflict resolution and compatibility features.Features
- Native Widget: Add Visual Portfolio directly from Elementor’s widget panel
- Live Preview: See your portfolio in real-time within the editor using an iframe preview system
- Lightbox Conflict Resolution: Automatically prevents conflicts between Elementor’s lightbox and Visual Portfolio’s lightbox
- Swiper Compatibility: Intelligently manages Swiper library versions to ensure compatibility with both Elementor and Visual Portfolio
How It Works
The Elementor integration consists of two main components:Widget Registration
Location:classes/3rd/plugins/class-elementor.php:27
Lightbox Conflict Fix
Location:classes/3rd/plugins/class-elementor.php:52
Visual Portfolio automatically adds data-elementor-open-lightbox="no" to gallery image links to prevent Elementor’s lightbox from interfering:
Swiper Library Management
Location:classes/3rd/plugins/class-elementor.php:114
The integration detects Elementor’s version and loads the appropriate Swiper library:
- Elementor < 3.11.0: Uses Swiper 5.3.6
- Elementor >= 3.11.0: Uses Swiper based on
e_swiper_latestexperiment - Elementor >= 3.28.0: Automatically uses Swiper 8.4.5
Using the Widget
- Edit a page with Elementor
- Search for “Visual Portfolio” in the widget panel
- Drag the widget to your desired location
- Select a saved portfolio layout from the dropdown
- The portfolio will render with live preview in the editor
Divi Builder
Visual Portfolio provides compatibility with Divi’s lazy loading system.Features
- Lazy Load Compatibility: Fixes image width issues when both Divi and Visual Portfolio lazy loading are enabled
- Shortcode Support: Use Visual Portfolio shortcodes in Divi modules
Image Width Fix
Location:classes/3rd/plugins/class-divi.php:27
When Divi’s lazy loading is active alongside Visual Portfolio’s full lazy loading, a CSS fix ensures images display at proper width:
Using with Divi
- Add a “Code” or “Text” module to your Divi layout
- Insert the Visual Portfolio shortcode:
[visual_portfolio id="123"] - Save and view your page
WPBakery Page Builder (Visual Composer)
Visual Portfolio includes a native element for WPBakery Page Builder (formerly Visual Composer).Features
- Native Element: Dedicated Visual Composer element in the VC editor
- Frontend Editor Support: Works in both backend and frontend editors
- Custom Classes: Add CSS classes for styling
- Design Options: Access Visual Composer’s design options panel
Element Registration
Location:classes/3rd/plugins/class-vc.php:45
The element is registered with the following configuration:
Using the Element
- Edit a page with WPBakery Page Builder
- Click “Add Element”
- Find “Visual Portfolio” in the element list
- Select a saved layout from the dropdown
- Optionally add custom CSS classes
- Configure design options if needed
- Save your page
Frontend Editor
Location:classes/3rd/plugins/class-vc.php:36
The integration loads special scripts for the frontend editor:
Thrive Architect
Visual Portfolio provides compatibility with Thrive Architect’s page rendering system.Features
- Dynamic Style Support: Special handling for inline dynamic styles
- Shortcode Compatibility: Use Visual Portfolio shortcodes in Thrive Architect elements
Implementation
Location:classes/3rd/themes/class-thrive-architect.php:32
Because Thrive Architect overrides page output, the integration disables inline style enqueuing:
Using with Thrive Architect
- Edit a page with Thrive Architect
- Add a “Custom HTML” or “Shortcode” element
- Insert your Visual Portfolio shortcode:
[visual_portfolio id="123"] - Save and preview your page
General Integration Notes
Shortcode Support
All page builders support the standard Visual Portfolio shortcode:id(required): The ID of your saved portfolio layoutclass(optional): Additional CSS classes
Gutenberg Block
If your page builder supports Gutenberg blocks, you can also use the Visual Portfolio block:- Add a new block
- Search for “Visual Portfolio”
- Select your saved layout
Performance Considerations
- Asset Loading: Visual Portfolio only loads scripts and styles when a portfolio is present on the page
- Lazy Loading: Works automatically with all page builders
- Caching: Compatible with page builder caching systems
Troubleshooting
Portfolio not appearing:- Ensure you’ve selected a valid layout ID
- Check that the layout exists in Visual Portfolio > All Items
- Clear your page builder cache
- Elementor: Automatically handled
- Other builders: Disable the page builder’s lightbox for portfolio images
- Check for CSS conflicts in your browser’s inspector
- Ensure your theme isn’t overriding portfolio styles
- Try adding custom CSS classes for specificity
Custom Integration
If you’re developing a custom page builder integration, you can reference the existing implementations:- Elementor:
classes/3rd/plugins/class-elementor.phpandclass-elementor-widget.php - Divi:
classes/3rd/plugins/class-divi.php - Visual Composer:
classes/3rd/plugins/class-vc.php