Show Custom Field By Category (and sub categories)
Support › MB Builder › Show Custom Field By Category (and sub categories)Resolved
- This topic has 11 replies, 2 voices, and was last updated 4 years, 11 months ago by
SteveCo.
-
AuthorPosts
-
May 12, 2020 at 12:21 AM #19566
SteveCo
ParticipantI am trying to figure out how to display custom fields by parent and any of its subcategories from the GUI (I have the AIO license). If I choose "Taxonomy" from the Settings tab in Custom Fields, I don't see the category/categories I am needing.
May 12, 2020 at 10:22 AM #19578Long Nguyen
ModeratorHi Steve,
The Settings tab supports to display the field for taxonomy. The default taxonomies of WordPress are Category, Tag, and the category name or sub-categories is the term of the taxonomy Category.
For more information, please follow the documentation
https://developer.wordpress.org/themes/basics/categories-tags-custom-taxonomies/
https://docs.metabox.io/extensions/mb-term-meta/#creating-meta-boxesI hope that makes sense.
May 18, 2020 at 11:22 PM #19671SteveCo
ParticipantI am not sure if I follow... So they CAN display in a parent/child relationship in the builder? I don't see anything in the, "Settings" for this. I am wanting to see that visual representation of parents and children (Category/Sub Categories).
May 19, 2020 at 2:46 AM #19672SteveCo
ParticipantI have a category called, "Toys" and a subcategory called, "Action Figures" and another subcategory called, "Star Wars" and "TRANSFORMERS". When I go to Settings > Taxonomies, I would expect to see the categories listed as:
Toys
- Action Figures
-- Star Wars
-- TRANSFORMERSBut I don't see this.
May 19, 2020 at 3:04 AM #19673SteveCo
ParticipantSee attachment. I have 3 "Category" Taxonomies and I have no idea how to distinguish between them. See screenshot (you can only see 2 of them in the screenshot). Also, I have subcategories under my "Category" taxonomy but since they do not appear, I cannot target them. See attachment.
May 19, 2020 at 9:04 AM #19677Long Nguyen
ModeratorHi Steve,
Let me explain more about this case. There are some custom posts type have the same taxonomy name Category but have different slug, please see my screenshot https://share.getcloudapp.com/RBuv2NxG
Toys -> is the term of the taxonomy
– Action Figures -> is the child term of ToysSo if you show the field for taxonomy, it will display on all the term's setting page of the taxonomy. You can also take a look at my short screen record.
https://www.loom.com/share/3bad103f2bc3417580373491f513abccMay 19, 2020 at 7:43 PM #19680SteveCo
ParticipantThanks. I believe I understand how it's working now. However, I still think it would be helpful if there was a way to distinguish between the taxonomies; just as you identified them via the screenshot. Also, I don't show the "Select Advanced Field" options on my category term page but rather all of the custom fields that I set within the "Settings" tab with the "Category" taxonomy.
May 20, 2020 at 1:50 AM #19691SteveCo
ParticipantAfter re-watching I still don't see a way to target a specific category "term" (subcategory). Am I missing something?
May 20, 2020 at 8:21 AM #19692SteveCo
ParticipantI just realized I posted in the wrong categories with several posts. Feel free to move them accordingly and delete this post.
May 20, 2020 at 8:59 AM #19704Long Nguyen
ModeratorHi,
I've moved it to the MB Builder sub-forum, we can discuss more on this topic.
Currently, the extension MB Term Meta only supports to show the field on all terms of the taxonomy. I will create a feature request to support showing the field on specific terms, just like
'terms' => array( termID, or termSlug )
.May 20, 2020 at 11:29 AM #19709SteveCo
ParticipantThank you!
May 26, 2020 at 10:12 AM #19822SteveCo
ParticipantThis is my suggestion to display the terms within a taxonomy:
Toys
– Action Figures (id#)
— Star Wars (id#)
— TRANSFORMERS (id#) -
AuthorPosts
- You must be logged in to reply to this topic.