Tagged: taxonomy
- This topic has 6 replies, 4 voices, and was last updated 6 months, 3 weeks ago by 
Steve. 
- 
AuthorPosts
 - 
- 
July 23, 2016 at 4:52 pm #7000
workvistaParticipantI have a custom taxonomy and I use it in a custom post.
The taxonomy admin UI page always show 0 items. This happens even for the piklist demo taxonomies. See the count = 0 in the attached image.When I click it it does show posts grouped in that taxonomy. See the 2nd attachment.
Attachments:
You must be logged in to view attached files. - 
July 24, 2016 at 12:08 pm #7010
kattagamiMemberI have the same bug on my website but don’t know if Piklist is involved in it.
I use this SQL query to reset the problem:
UPDATE wp_term_taxonomy SET count = ( SELECT COUNT(*) FROM wp_term_relationships rel LEFT JOIN wp_posts po ON (po.ID = rel.object_id) WHERE rel.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_taxonomy.taxonomy NOT IN ('link_category') AND po.post_status IN ('selected', 'publish', 'draft', 'future') )But each time I save my CPT, if a custom taxonomy is set to it, the count come back to “0”
 - 
July 24, 2016 at 3:12 pm #7011
workvistaParticipantYes. One more observation:
The counts work fine as long as I use a custom taxonomy and display it as the default metabox in admin UI.
When I follow steps on https://piklist.com/learn/doc/display-taxonomies-radio-checkboxes-select-list/
to convert the input as checkbox – only then the issue with count comes up. So it may have to do with Piklist.
@kattagami – are you displaying taxonomy as select/checkbox/radio too ? That may explain why you see the issue too ?- 
July 21, 2021 at 10:57 pm #11287
bktechcolorParticipantHey, I just wanna say many thanks to you !. You save my life. get_category() function does work and there is nothing display on my categoires page. but everything work after i follow your code 🙂 love you
 - 
July 22, 2021 at 11:39 am #11288
SteveKeymaster@bktechcolor — glad we could help. Love you too. 😉
 
 - 
 - 
July 26, 2016 at 10:22 am #7025
kattagamiMember@workvista Yes, I display my taxonomy in a select menu.
 - 
July 28, 2016 at 3:58 am #7040
kattagamiMemberAnyone else with this bug ?
@Steve, are you able to reproduce this bug ?
 
 - 
 - 
AuthorPosts
 
- You must be logged in to reply to this topic.