The Tiles layout allows you to create custom patterns with items of different sizes arranged in repeating sequences. Perfect for creating unique, eye-catching gallery designs.
Overview
Tiles layout is the most flexible layout option in Visual Portfolio, allowing you to define custom patterns where items can span multiple columns and have custom heights. This creates visually interesting galleries with a curated, designer feel.Key Features
- Custom patterns: Define repeating tile patterns with varying sizes
- Flexible dimensions: Items can span multiple columns and rows
- Pattern sequences: Create complex repeating layouts
- Masonry-based: Uses Isotope masonry mode with custom sizing
- Responsive design: Patterns adapt to different screen sizes
Configuration Options
Tiles Type Pattern
Defines the tile pattern. Format:
columns|width,height|width,height|- First number: number of columns
- Following pairs: width,height ratios for each item in the pattern
- Pattern repeats for all items
Understanding Pattern Syntax
The tiles pattern uses a specific format:3|1,1|2,1|
3= 3 columns total1,1= Item 1: 1 column wide, 1x height2,1= Item 2: 2 columns wide, 1x height- Pattern repeats: Items 3-4 use same pattern
Pattern Examples
Classic Alternating Pattern
Hero + Grid Pattern
Pinterest Style
Magazine Layout
Implementation Details
Pattern Parsing
The plugin parses tile patterns from the settings:Dynamic Sizing
Items are styled dynamically based on the pattern:Responsive Behavior
Tiles layout adapts to smaller screens by reducing columns:- Desktop: Full pattern as defined
- Tablet: Reduced columns, simplified pattern
- Mobile: Further reduced (usually 1-2 columns)
Usage Examples
Default Tiles Pattern
Hero + Grid Pattern
Pinterest-Style Pattern
Gutenberg Block
In the Block Editor:- Add Visual Portfolio block
- Select Tiles layout
- Use the Tiles Selector component to design your pattern
- Or enter pattern manually in format:
columns|w,h|w,h| - Adjust gap and styling
Best Practices
When to use Tiles layout
When to use Tiles layout
- You want a unique, custom gallery design
- Creating editorial or magazine-style layouts
- Emphasizing certain items (hero images)
- Building portfolio showcases with featured work
- Creating visually interesting landing pages
Pattern design tips
Pattern design tips
- Start simple and add complexity gradually
- Test patterns with real content
- Use 2-6 columns for best results
- Create patterns that repeat well
- Consider mobile appearance when designing
Performance considerations
Performance considerations
- Complex patterns may require more calculation
- Use lazy loading for image-heavy tiles
- Test performance with full content
- Optimize images to appropriate sizes
Design considerations
Design considerations
- Ensure important content isn’t hidden on mobile
- Use hero items (2x2) sparingly
- Maintain readability with adequate gaps
- Test pattern with varying image aspect ratios
Common Patterns Library
Two Column Alternating
Three Column Balanced
Four Column Hero
Five Column Magazine
Six Column Complex
Tiles Selector Component
In Gutenberg, use the built-in Tiles Selector:- Located at:
gutenberg/components/tiles-selector/ - Visual drag-and-drop interface
- Real-time pattern preview
- Generates pattern string automatically
Common Issues
Combining with Features
Tiles layout works with:- Item Styles: Add hover effects to tiles
- Filters: Filter while maintaining pattern
- Lightbox: Open tiles in full-screen view
- Pagination: Load more tiles dynamically
Advanced Customization
Developers can hook into tiles layout:Related Layouts
Masonry Layout
Dynamic heights with automatic positioning
Grid Layout
Consistent uniform grid
Source Code Reference
- JavaScript:
assets/js/layout-tiles.js:1 - Pattern Parser:
assets/js/layout-tiles.js:79 - Layout Initialization:
assets/js/layout-tiles.js:110 - Tiles Selector:
gutenberg/components/tiles-selector/ - Isotope Fix:
assets/js/layout-tiles.js:15