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

[bw_group] shortcode to count the occurrences of a particular field value #4

Closed
bobbingwide opened this issue Nov 29, 2015 · 1 comment

Comments

@bobbingwide
Copy link
Owner

WordPress provides functions such as wp_list_categories() which provides counts of the total number of items in a particular taxonomy by category term. I need to be able to summarise the number of posts with a particular value. e.g. For the custom post type "competitor" there is a taxonomy of playing status. I want to be able to display the total number of competitors for an event by status.
e.g. Yes 19, No 3, TBC 4

Proposed solution

Develop a new shortcode called [bw_group] that will display the results of the query, summarising by the possible or discovered values depending on the grouping field's field type.

e.g.
[bw_group post_type='competitor' meta_key=_event meta_value=123 field='playing_status']

@bobbingwide
Copy link
Owner Author

The first draft of this change has been developed. So far it's only been tested counting taxonomy terms.

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