Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

1 vote

Custom taxonomy not showing up when adding a new custom post type

For anyone using Custom Post Types UI's Taxonomies , the "Show in REST API" must be checked on CPT UI -> Add/Edit Taxonomies. It's ...
Andrew E's user avatar
0 votes

How to enforce a requirement for custom taxonomy

You could consider using the wp_insert_post_empty_content hook. This hook determines if a post is considered empty and if so, prevents it from being saved. For example: /** * Checks whether some post ...
Wongjn's user avatar
  • 266
0 votes

List taxonomy / category count showing list published posts only

A bit late to the party, but I was looking for something similar. I'd like to propose an alternate method that doesn't query the database X amount of times in a loop, in the case that you have a large ...
Sean Michaud's user avatar
1 vote

Showing all posts of the current custom taxonomy on archive page

I have finally found a solution and for anyone interested, here is the working code : <?php // The Query if (is_tax() || is_category() || is_tag() ){ $qobj = $wp_query->get_queried_object()...
Anna's user avatar
  • 21

Top 50 recent answers are included