Archive Templates
Archive templates allow you to customize the layout and design of category archives, tag archives, custom taxonomy archives, and other archive pages on your WordPress site.
What are Archive Templates?
Section titled “What are Archive Templates?”Archive templates control how WordPress displays lists of posts grouped by:
- Categories: Posts in a specific category
- Tags: Posts with a specific tag
- Date Archives: Posts from a specific month/year
- Author Archives: Posts by a specific author
- Custom Taxonomies: Custom taxonomy term archives
- Post Type Archives: Archives for custom post types
Creating an Archive Template
Section titled “Creating an Archive Template”Step 1: Create New Template
Section titled “Step 1: Create New Template”- Go to WPBits AFE → Theme Builder
- Click Add New Template
- Select Archive as the location
- Name your template (e.g., “Blog Archive”)
- Click Create Template
Step 2: Add Archive Title
Section titled “Step 2: Add Archive Title”- Add [WPBits] Archive Title widget
- The title automatically shows:
- “Category: Design” for category archives
- “Tag: WordPress” for tag archives
- “Author: John Doe” for author archives
- Customize typography and styling
Step 3: Add Archive Description (Optional)
Section titled “Step 3: Add Archive Description (Optional)”- Add [WPBits] Archive Description widget
- Shows the category/tag description (if set)
- Style as needed
Step 4: Add Grid Master
Section titled “Step 4: Add Grid Master”- Add [WPBits] Grid Master widget
- Under Query settings:
- Query Source: Select Global Query
- This makes it use the archive’s posts
- Configure layout (columns, gap, etc.)
- Design the post items
Step 5: Add Breadcrumbs (Optional)
Section titled “Step 5: Add Breadcrumbs (Optional)”- Add [WPBits] Breadcrumb widget
- Provides navigation context
- Customize separator and styling
Step 6: Publish and Assign
Section titled “Step 6: Publish and Assign”- Click Publish
- Set Display Conditions:
- All Archives: Applies to all archive types
- Specific Categories: Only certain categories
- Specific Post Type Archives: Only certain CPT archives
Grid Master with Global Query
Section titled “Grid Master with Global Query”Setting Up Global Query
Section titled “Setting Up Global Query”- Add Grid Master widget
- Query tab → Query Source: Global Query
- Configure Layout:
- Columns: 3 (desktop), 2 (tablet), 1 (mobile)
- Gap: 30px
- Design post items using Element Builder
Why Use Global Query?
Section titled “Why Use Global Query?”- Automatically shows the correct posts for each archive
- Works with WordPress pagination
- Respects WordPress’s posts-per-page setting
- Works with archive filtering
Element Builder
Section titled “Element Builder”Build your post card:
-
Featured Image:
- Size: Medium or Large
- Link to post
- Hover effects
-
Category/Terms:
- Display post categories
- Link to category archives
-
Post Title:
- Link to post
- Typography styling
- Hover color
-
Post Excerpt:
- Length: 150-200 characters
- Or use custom length
-
Post Meta:
- Date
- Author
- Comment count
-
Read More Link:
- Custom text
- Button styling
Pre-Built Archive Templates
Section titled “Pre-Built Archive Templates”Use pre-built templates:
- Click WPBits logo in Elementor
- Browse Archive Templates
- Import a grid template
- Customize styling to match your brand
Popular styles:
- Classic Grid: Featured image, title, excerpt, meta
- Card Style: Bordered cards with shadows
- Masonry Grid: Pinterest-style layout
- List View: Horizontal layout with image on left
Archive Page Structure
Section titled “Archive Page Structure”Typical Layout
Section titled “Typical Layout”Section: Breadcrumbs├── [WPBits] Breadcrumb widget
Section: Archive Header├── [WPBits] Archive Title└── [WPBits] Archive Description
Section: Post Grid└── [WPBits] Grid Master (Global Query) ├── Featured Image ├── Categories ├── Post Title ├── Post Excerpt ├── Post Meta (Date, Author) └── Read More Link
Section: Pagination└── (Grid Master handles this automatically)Conditional Archive Templates
Section titled “Conditional Archive Templates”Create Different Templates for Different Archives
Section titled “Create Different Templates for Different Archives”Blog Category Archive:
- Create archive template
- Set Display Condition: Categories → Select blog categories
- Design with large featured images
Portfolio Archive:
- Create archive template
- Set Display Condition: Portfolio post type archive
- Design with image-focused grid, no excerpts
Author Archive:
- Create archive template
- Set Display Condition: Author Archives
- Add author bio section before Grid Master
Advanced Features
Section titled “Advanced Features”Archive Filtering
Section titled “Archive Filtering”Add category filters above the grid:
- In Grid Master, enable Show Filters
- Set Filter Type: Categories
- Choose Filter Style: Buttons or Dropdown
- Enable Ajax Filtering for no-reload filtering
Sidebar Integration
Section titled “Sidebar Integration”Add a sidebar to archives:
- Use a 2-column layout:
- Column 1 (70%): Grid Master
- Column 2 (30%): Sidebar widgets
- Add widgets:
- Search
- Categories
- Popular posts
- Tags cloud
Custom Field Display
Section titled “Custom Field Display”Show custom fields in archive items:
- In Grid Master Element Builder
- Add Custom Field element
- Select your ACF or custom field
- Style the output
Pagination
Section titled “Pagination”Grid Master includes pagination:
Pagination Types
Section titled “Pagination Types”- Number Pagination: Classic page numbers
- Load More: Ajax load more button
- Infinite Scroll: Auto-load on scroll
Configuration
Section titled “Configuration”- In Grid Master → Pagination settings
- Choose pagination type
- Customize styling
- Set posts per page (or use WordPress default)
Responsive Design
Section titled “Responsive Design”Mobile Considerations
Section titled “Mobile Considerations”- Columns: 3 → 2 → 1 (desktop → tablet → mobile)
- Image Size: Smaller on mobile to load faster
- Excerpt Length: Shorter or hidden on mobile
- Meta: Show only essential meta on mobile
- Spacing: Reduce gap on mobile
Tablet Optimizations
Section titled “Tablet Optimizations”- 2-column grid typically works well
- Maintain readability
- Adjust font sizes if needed
SEO Best Practices
Section titled “SEO Best Practices”Archive Page SEO
Section titled “Archive Page SEO”- Unique Descriptions: Write unique category descriptions
- Proper Headings: Use H1 for archive title
- Breadcrumbs: Help search engines understand structure
- Pagination: Ensure pagination is crawlable
- Image Alt Text: Add alt text to featured images
Archive Title Widget
Section titled “Archive Title Widget”Outputs proper heading hierarchy:
- Uses H1 for archive titles
- Includes proper schema markup
- Shows category/tag names dynamically
Common Use Cases
Section titled “Common Use Cases”Blog Archive
Section titled “Blog Archive”- Classic blog layout
- Featured images
- Excerpts and meta
- Category filtering
- Number pagination
Portfolio Archive
Section titled “Portfolio Archive”- Image-heavy grid
- No excerpts
- Hover effects on images
- Filter by portfolio category
- Load more pagination
WooCommerce Shop Archive
Section titled “WooCommerce Shop Archive”Use WooCommerce Grid Master instead:
- Product images
- Price display
- Add to cart buttons
- Product categories filter
- Sale badge
News Archive
Section titled “News Archive”- Latest news first
- Prominent date display
- News category tags
- Breaking news highlight
- Infinite scroll
Troubleshooting
Section titled “Troubleshooting”Archive Template Not Showing
Section titled “Archive Template Not Showing”- Verify template is published
- Check display conditions
- Ensure archive pages exist (posts in categories)
- Clear cache
Wrong Posts Showing
Section titled “Wrong Posts Showing”- Verify “Global Query” is selected in Grid Master
- Check that you’re not overriding query settings
- Ensure proper display conditions
Pagination Not Working
Section titled “Pagination Not Working”- Check Grid Master pagination settings
- Ensure Global Query is used
- Verify WordPress Settings → Reading posts per page
- Clear cache and permalinks
Styling Not Applied
Section titled “Styling Not Applied”- Theme CSS may override
- Use higher specificity or !important
- Check Elementor Preview mode vs actual archive
- Consider using a minimal theme
Performance Tips
Section titled “Performance Tips”- Limit Posts per Page: 9-12 posts is optimal
- Optimize Images: Use appropriate image sizes
- Lazy Load Images: Enable for images below fold
- Cache Archives: Use caching plugin
- Minimize Queries: Don’t add too many custom queries
Next Steps
Section titled “Next Steps”- Explore Grid Master for advanced grid options
- Create Header & Footer templates
- Learn about Location Templates
Support
Section titled “Support”Need help with archive templates?