Nice plugin and it works very good.
i’ve to run this plugin twice a day so how can i set this in a cronjob?
Greetings Senatorman
]]>I think the function update_category_correct_count in fix_category_count_engine.php needs the following line changed:
from:
$wpdb->update(‘wp_term_taxonomy’, array(‘count’=>$count), array(‘term_taxonomy_id’=>$row[‘term_id’]));
to:
$wpdb->update($wpdb->prefix.’term_taxonomy’, array(‘count’=>$count), array(‘term_id’=>$row[‘term_id’]));
The 2 changes are:
1. Pulling in the prefix for the term_taxonomy table instead of defaulting to the prefix of “wp_”
2. The database update call should match against column ‘term_id” and not ‘term_taxonomy_id, since the input being matched is the term_id and not the term_taxonomy_id. In some databases these numbers might be the same, but they were different by 1 in mine giving me errors.
For many people the default code might not cause errors, but they did for me.
After I made these changes, the plugin worked great for me. Thank you.
When I press FIX CATEGORY COUNT, I am getting the following error:
“Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\wordpress\wp-content\plugins\fix-category-count\inc\fix_category_count_admin_view.php on line 68”.
Nothing else appears.
Please advise. Thanks.
WP 4.5.3, Twenty Sixteen theme, no other plugins active.