• Resolved Goddamn Noise

    (@goddamnnoise)


    I’m using last version of Custom Post Type UI plugin with the last version of the WordPress core.

    I’ve created one custom taxonomy and i’ve attached it to a custom post type. I have more than 100 terms in that taxonomy and the problem is when I want to attach one term to a post of the custom post type not all the taxonomy’s terms are showing in the meta box field. The last few terms are not showing so I can’t select those.

    It seems like some kind of limit when the taxonomy terms are retrieved from the database to be showed in the field.

    Is there any filter I can use to remove this limitation while this bug is not fixed?

    Thanks a lot in advance for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That sounds like something either coming from a different plugin, or potentially WordPress core. I know it’s not something that we limit in some way with CPTUI.

    Is your taxonomy set to be hierarchical, where it’d be the checkbox version similar to categories? or is it non-hierarchical where it’s just a textbox that you type into and get suggested possible terms to choose?

    Thread Starter Goddamn Noise

    (@goddamnnoise)

    Hi Michael,

    Thanks for your help.

    The taxonomy is set to be hierarchical: to set a category term I have to check a checkbox and there is a field to search terms too.

    It seems like a hard limit on the request to retrieve the terms from the database. I’ve deleted a few terms and when the number of terms in the taxonomy is equal to 100 or less there is no problem and all the terms are showed.

    But, if the number of terms is greather than 100 then there are terms which are not showed.

    Do you know of some hook I could use to remove that limit or what could I do to fix it?

    Thanks a lot again.

    Thread Starter Goddamn Noise

    (@goddamnnoise)

    Finally I found a way to fix it using the get_terms_args() filter and setting number equal to 0 wherever the category terms are requested from the database.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That works as well. If I’ve ever dived into the metabox and how it populates everything, it’s been a long time, so I didn’t have any ideas on filters off the top of my head.

    Glad you got a solution working in the end.

    Thread Starter Goddamn Noise

    (@goddamnnoise)

    I tried a few filters related with how the metabox poulates things but it didn’t work, so I had to try other things and it worked with the get_terms_args().

    Thanks again for your help.

    Goddamn Noise what was your mistake? Probably I’m doing it either because I can’t see the category list either.

    Thread Starter Goddamn Noise

    (@goddamnnoise)

    Hi Filipe,

    Not my mistake, it seems like there is a limit in WordPress core and it only shows the first 100 terms in the field. You can fix it with the get_terms_args() hook as I’ve explained in a previous message.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom taxonomy not showing all terms on meta box’ is closed to new replies.