• Hello,

    I want to make a selection for a specific taxonomy terms.
    So i have the taxonomy named “People” for example, is there possible to add a function, a checkbox, when i edit the taxonomy to check “make it pinned” so therefore i can select it on the first page based on the checkbox, to show me only the taxonomy terms with that checkbox checked. Is that possible?

    Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes it’s possible. You could add such a field to a custom meta box added to the term edit screen, and/or add another column to the terms list table. Save the selected state as term meta.

    The terms list table uses get_terms() to generate what is shown, so you can use the “get_terms” filter to insert any pinned terms into the returned list. The terms listed per page will be thrown off by the addition. Other than that, the main side effect is there could be pinned terms that also appear in the principal listing. Both of these effects can be corrected through the “pre_get_terms” action if they are bothersome to you.

    The code needed to do all of that gets rather involved. You’d want to see if any sort of existing taxonomy management plugin can help you easily find common terms before embarking on a custom code project.

Viewing 1 replies (of 1 total)
  • The topic ‘Pinned Taxonomy?’ is closed to new replies.