Get term count on a category page

Rather than adding shortcode you have to add the hook which is on the product category page: // Use this hook for working directly on category page // add_action( ‘woocommerce_archive_description’, ‘show_category_product_counts’, 10 ); // Use this shortcode hook if you want to put on anywhere in the category page if you are using Elementor/WPBakery add_shortcode( … Read more

I want this code to work only for Authors AND Contributors

Here you go, and remember, this assumes that your function was already working (I did not check that it was), and if it was, then just wrap like this: <?php add_action( ‘admin_menu’, ‘wf_cli_remove_admin_menu’ ); function wf_cli_remove_admin_menu() { $wf_user = wp_get_current_user(); $wf_roles = array( ‘contributor’, ‘author’ ); if( array_intersect( $wf_roles, $wf_user->roles ) ) : remove_menu_page( ‘index.php’ … Read more