feat(theme): add [roi_post_grid] shortcode for static pages
- Create PostGridShortcodeRegistrar for WordPress shortcode registration - Implement RenderPostGridUseCase following Clean Architecture - Add PostGridQueryBuilder for custom WP_Query construction - Add PostGridShortcodeRenderer for HTML/CSS generation - Register shortcode in DIContainer with proper DI - Add shortcode usage guide in post-grid admin panel - Fix sidebar layout: add hide_for_logged_in check to wrapper visibility Shortcode attributes: category, tag, author, posts_per_page, columns, show_pagination, show_thumbnail, show_excerpt, show_meta, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -562,3 +562,22 @@ function roi_get_adsense_search_config(): array {
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// POST GRID SHORTCODE [roi_post_grid]
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Registra el shortcode [roi_post_grid] para mostrar grids de posts
|
||||
* en cualquier pagina o entrada.
|
||||
*
|
||||
* USO:
|
||||
* [roi_post_grid]
|
||||
* [roi_post_grid category="precios-unitarios" posts_per_page="6"]
|
||||
* [roi_post_grid id="grid-1" category="cursos" show_pagination="true"]
|
||||
*
|
||||
* @see Shared/Infrastructure/Wordpress/PostGridShortcodeRegistrar
|
||||
*/
|
||||
add_action('init', function() {
|
||||
\ROITheme\Shared\Infrastructure\Wordpress\PostGridShortcodeRegistrar::register();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user