Advanced HTML sitemap generator for WordPress with modern PSR-4 autoloading, OOP architecture, intelligent caching, and extensive customization options.
- Modern Architecture: PSR-4 autoloading with clean OOP design
- Powerful Shortcode: Single comprehensive
[easy_sitemap]shortcode with extensive attributes - Visual Shortcode Generator: Interactive builder in admin panel
- Intelligent Caching: Transient-based caching with configurable expiry (guests only)
- Universal CPT Support: Automatic support for all public custom post types including WooCommerce
- Smart Taxonomy Detection: Automatic taxonomy resolution for each post type
- Advanced Filtering: Post types, categories, tags, taxonomies, authors, date ranges, inclusions/exclusions
- Hierarchical Display: Pages by parent-child relationships, posts grouped by categories
- Display Options: Publication dates, excerpts, featured images
- Multi-Column Layout: Responsive grid layouts (up to 6 columns)
- Custom CSS: Safe inline styling without theme modifications
- Performance Optimized: Efficient database queries with
no_found_rowsoptimization - SEO Friendly: Clean, semantic markup with proper structure
- Quicktags Support: Classic editor integration for easy shortcode insertion
| Screenshot 1 | Screenshot 2 | Screenshot 3 |
|---|---|---|
![]() |
![]() |
![]() |
- WordPress: 5.0+
- PHP: 7.2+
- MySQL: 5.6+
- Download and extract the plugin files
- Upload the
easy-sitemapfolder towp-content/plugins/ - Activate the plugin through WordPress admin → Plugins
- Go to Settings → Easy Sitemap to configure options
- Use the Shortcode Generator or add shortcodes to your content
Insert the shortcode into any page, post, or custom post type:
[easy_sitemap]This displays a complete sitemap with all posts, pages, and custom post types.
post_type- Filter by post type (e.g.,post,page,product,portfolio)limit- Number of items to display (default: 1000, max: 1000)orderby- Sort order:date,title,modified,menu_order,rand,ID,author,name(default:date)order- Sort direction:DESC(default) orASC
include- Include specific post IDs (comma-separated):1,2,3exclude- Exclude specific post IDs (comma-separated):4,5,6category- Filter by category slugs (comma-separated):news,blogtag- Filter by tag slugs (comma-separated):featured,populartaxonomy+term- Custom taxonomy filtering:taxonomy="product_cat" term="electronics"author- Filter by author ID:1date_from/date_to- Date range (YYYY-MM-DD format):date_from="2023-01-01"
show_dates- Show publication dates (0/1, default: 0)show_excerpts- Show post excerpts (0/1, default: 0)show_images- Show featured images (0/1, default: 0)hierarchical- Hierarchical display for pages/posts (0/1)depth- Hierarchy depth (0 = unlimited, default: 0)columns- Number of columns (default: 1, max: 6)class- Custom CSS class for styling
cache- Enable caching for this instance (0/1, default: use global setting)cache_expiry- Cache lifetime in seconds (default: 3600)
// Basic sitemap with date display
[easy_sitemap show_dates="1"]
// Posts from specific categories
[easy_sitemap post_type="post" category="news,blog" limit="20"]
// Hierarchical pages ordered by menu
[easy_sitemap post_type="page" hierarchical="1" orderby="menu_order"]
// WooCommerce products with images
[easy_sitemap post_type="product" show_images="1" limit="12"]
// Custom post type with excerpts
[easy_sitemap post_type="portfolio" show_excerpts="1" show_images="1"]
// Filtered by date range and author
[easy_sitemap author="1" date_from="2023-01-01" date_to="2023-12-31"]
// Custom taxonomy filtering
[easy_sitemap taxonomy="product_cat" term="electronics" show_images="1"]
// Multi-column display
[easy_sitemap post_type="post" columns="3" limit="30"]Located in Settings → Easy Sitemap:
- Select post type from dropdown
- Set display limits and sorting options
- Configure filtering (categories, tags, etc.)
- Toggle display options (dates, excerpts, images)
- Generated shortcode appears automatically
- Click "Copy Shortcode" or select manually
- Enable Caching: Global toggle for caching system
- Cache Expiry: Lifetime in seconds (300-86400, default: 3600)
- Per-Shortcode Control: Override global settings with
cacheattribute
- Uses WordPress transients for efficient storage
- Only caches output for non-logged-in users (guests) to ensure dynamic content for logged-in users
- Cache keys are generated from shortcode attributes and content parameters for uniqueness
- Default cache expiry: 3600 seconds (1 hour), configurable from 300-86400 seconds
- Configurable global cache settings in Settings → Easy Sitemap
- Override global settings per shortcode with
cache="0"to disable caching for dynamic content - Automatic cache clearing on plugin deactivation
Add custom CSS in Settings → Easy Sitemap → Custom CSS:
/* Main wrapper */
.easy-sitemap {
margin: 20px 0;
}
/* List styling */
.easy-sitemap-list {
list-style: none;
padding-left: 0;
}
/* Individual items */
.easy-sitemap-item {
margin: 8px 0;
padding: 5px 0;
}
/* Date styling */
.easy-sitemap-date {
color: #666;
font-size: 0.9em;
}
/* Excerpt styling */
.easy-sitemap-excerpt {
margin: 5px 0;
font-style: italic;
}
/* Image styling */
.easy-sitemap-image {
max-width: 100px;
height: auto;
margin: 5px 10px 5px 0;
}The plugin automatically detects and supports all public custom post types:
// Any registered CPT
[easy_sitemap post_type="portfolio"]
[easy_sitemap post_type="event"]
[easy_sitemap post_type="testimonial"]Smart taxonomy detection for filtering:
// WooCommerce
[easy_sitemap post_type="product" taxonomy="product_cat" term="electronics"]
[easy_sitemap post_type="product" taxonomy="product_tag" term="featured"]
// Custom taxonomies
[easy_sitemap post_type="portfolio" taxonomy="portfolio_category" term="web-design"]- Ensure
show_images="1"is set - Verify posts have featured images set
- Plugin automatically enables thumbnail support for all public post types
- Try manual copy if "Copy Shortcode" button fails
- Check browser clipboard permissions
- Textbox is auto-selected for manual selection
- Enable caching in settings
- Increase cache expiry for stable content
- Use
limitattribute to reduce output - Disable caching per shortcode with
cache="0"for dynamic content
- Use browser developer tools to inspect elements
- Add custom CSS with higher specificity
- Use the
classattribute for unique styling
Modern PSR-4 autoloaded architecture with clean separation of concerns:
classes/
├── EasySitemap/
│ ├── Admin/
│ │ └── Admin.php # Admin interface and settings
│ ├── Frontend/
│ │ ├── Assets.php # Frontend asset management
│ │ └── Shortcodes.php # Shortcode processing engine
│ ├── Autoloader.php # PSR-4 autoloading system
│ └── Plugin.php # Main plugin bootstrap and initialization
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin interface styles
│ │ └── frontend.css # Frontend sitemap styles
│ └── js/
│ ├── admin.js # Admin functionality
│ └── frontend.js # Frontend interactions
├── languages/
│ ├── easy-sitemap-en_US.mo # English (US) translations (compiled)
│ ├── easy-sitemap-en_US.po # English (US) translations (source)
│ ├── easy-sitemap-zh_CN.mo # Chinese translations (compiled)
│ └── easy-sitemap-zh_CN.po # Chinese translations (source)
└── index.php # Plugin entry point
EasySitemap\Plugin- Main plugin controllerEasySitemap\Admin\Admin- Admin settings and interfaceEasySitemap\Frontend\Shortcodes- Shortcode processing engineEasySitemap\Frontend\Assets- Asset management
// Custom image size filter for featured images
add_filter( 'easy_sitemap_image_size', function( $size ) {
return 'medium'; // Default: 'thumbnail'
} );
// Custom CSS class filter for main wrapper
add_filter( 'easy_sitemap_wrapper_class', function( $class ) {
return $class . ' custom-wrapper';
} );
// Modify shortcode attributes before processing
add_filter( 'easy_sitemap_shortcode_atts', function( $atts ) {
// Modify attributes here
return $atts;
} );
// Modify query arguments before execution
add_filter( 'easy_sitemap_query_args', function( $query_args, $atts ) {
// Modify query arguments here
return $query_args;
}, 10, 2 );
// Modify the final output HTML
add_filter( 'easy_sitemap_output', function( $output, $atts, $posts ) {
// Modify or extend output here
return $output;
}, 10, 3 );
// Custom post type support filter
add_filter( 'easy_sitemap_supported_post_types', function( $post_types ) {
// Add or remove supported post types
return $post_types;
} );- Text domain:
easy-sitemap - Translation files:
languages/directory - Currently includes English (en_US) and Chinese (zh_CN) translations
- Fully translatable admin interface and frontend output
Licensed under the GNU General Public License v2.0 or later.
Copyright (C) 2025 snowbedding
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Made with ❤️ for the WordPress community


