Maesea let me know that they use some of the categories on the site only for internal purposes, and do not want to list them on the front end. We need to modify reconasia_display_categories to accommodate this.
[ ] Add an ACF to the categories taxonomy. This should probably be a boolean, that is is_hidden and set to false by default.
[ ] Modify the above function so the only categories that appear in the list are those that have the is_hidden ACF set to false.
To do this, it might be worth looking into using wp_list_categories() instead of get_the_category_list(), because it gives you the ability to exclude categories. If you go this route, I would recommend doing it this way:
Get a list of categories that are hidden --> specifically their IDs
Pass that list to the exclude property of wp_list_categories()
Related
While we're making edits here, we can get rid of these lines, as the Recon Asia site doesn't have an event custom post type, so this will never evaluate as true.
Maesea let me know that they use some of the categories on the site only for internal purposes, and do not want to list them on the front end. We need to modify
reconasia_display_categories
to accommodate this.is_hidden
and set to false by default.is_hidden
ACF set to false.To do this, it might be worth looking into using
wp_list_categories()
instead ofget_the_category_list()
, because it gives you the ability to exclude categories. If you go this route, I would recommend doing it this way:exclude
property ofwp_list_categories()
Related
While we're making edits here, we can get rid of these lines, as the Recon Asia site doesn't have an
event
custom post type, so this will never evaluate as true.