Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  kattagami 3 years ago.

  • Author
    Posts
  • #7000

    workvista
    Participant

    I 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.
  • #7010

    kattagami
    Participant

    I 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”

  • #7011

    workvista
    Participant

    Yes. 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 ?

  • #7025

    kattagami
    Participant

    @workvista Yes, I display my taxonomy in a select menu.

  • #7040

    kattagami
    Participant

    Anyone else with this bug ?

    @Steve, are you able to reproduce this bug ?

You must be logged in to reply to this topic.