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:
FrankZamora
2025-12-06 21:33:20 -06:00
parent c23dc22d76
commit 79e91f59ee
13 changed files with 1532 additions and 2 deletions

View File

@@ -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();
});