Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [bw_related] meta_compare=between parameter option #9

Closed
bobbingwide opened this issue Mar 7, 2016 · 1 comment
Closed

Add [bw_related] meta_compare=between parameter option #9

bobbingwide opened this issue Mar 7, 2016 · 1 comment

Comments

@bobbingwide
Copy link
Owner

Shortcodes such as [bw_related] can be used to list items in the future and in the past but cannot be used for a date range, except by artificially limiting the number of items shown.
We need to be able to perform comparisons using between a and b.

@bobbingwide
Copy link
Owner Author

The solution I developed extends the filter for "oik_shortcode_atts".
If the meta_compare= parameter is "between" and the meta_value= and= parameters both have values then it creates a meta_query to perform the between logic.

This solution applies to any shortcode registered using bw_add_shortcode().

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

No branches or pull requests

1 participant