Skip to content

Instantly share code, notes, and snippets.

@ikamal7
Created October 15, 2020 07:51
Show Gist options
  • Save ikamal7/1b753eba5278dcae146d9c7245299cfc to your computer and use it in GitHub Desktop.
Save ikamal7/1b753eba5278dcae146d9c7245299cfc to your computer and use it in GitHub Desktop.
<?php
$terms = get_terms( 'company_tax',array(
'hide_empty' => false,
'pad_counts' => true,
));
foreach($terms as $term){
wp_update_term_count($term->term_id, 'company_tax', false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment