Skip to content

Conversation

@amirrnazemi
Copy link
Collaborator

Adds a new [anys type="loop"] ... [anys else] ... [/anys] shortcode for rendering WordPress queries dynamically.
The shortcode supports conditional output when no results are found and uses shared utility functions for cleaner logic.

Overview

  • Implemented generic loop system using WP_Query.
  • Added support for advanced attributes:
    • post_type, posts_per_page, s, search_in, meta_query, tax_query, exclude_current.
  • Introduced utility functions for query building, template splitting, and container exclusion.
  • Added merge_unknown_attributes() to preserve non-default shortcode parameters.
  • Refined output flow for paired shortcodes (loop / else) to prevent double rendering.

…ctor

- Added [anys type="loop"]... [anys else]...[/anys] with full WP_Query support.
- Moved reusable logic (split, query builder, search columns, container exclusion) to utilities.
- Preserved non-default attributes in shortcodes via merge_unknown_attributes().
- Updated output flow to avoid double rendering and safely process nested shortcodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants