Custom Fields by Category
This topic contains 11 replies, has 2 voices, and was last updated by Stiofan O’Connor 6 years, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 4, 2017 at 4:04 pm #398836
I may have asked this in the past, but maybe there’s been some new changes that make this easier:
Is it possible to set custom fields by category within a post type? If not, would this be a difficult custom modification?
Right now, I think you can only set custom fields by custom post type.
October 4, 2017 at 6:00 pm #398861Hello,
At the moment no, it is by CPT, we usually recommend to create a CPT per industry so they share custom fields. You can also limit them by price package also, which might help you achieve what you want?
Thanks,
Stiofan
October 4, 2017 at 6:02 pm #398862I’m going to have too many categories/sub-categories do create a separate price package for each one
For example, I have a CPT for:
CoursesThen under there, categories may be:
Cat 1
-Sub Cat 1
-Sub Cat 2
Cat 2
-Sub Cat 1
Cat 3
-Sub Cat 1
-Sub Cat 2
Cat 4Each of those categories may need separate field
October 4, 2017 at 6:26 pm #398872If we can detail a plan of how you think it should work i can tell you if i see any problems and if not we can look at implementing it (happy to discuss). At the moment it would require reloading the entire add listing form when a category is selected/deselected.
Stiofan
October 4, 2017 at 6:33 pm #398874Based on other themes I’ve looked it, I think this would be the easiest way:
When adding a custom field to a CPT, there would be another field there automatically that would allow you to choose what categories that field would show on (kind of like you have now with “show only on these price packages”)
This way, you’re basically just able to select what categories that specific field should show on
October 5, 2017 at 10:16 am #398952Adding the functionality to the backend it easy, how to implement it on the add listing form is the question 🙂
Stiofan
October 5, 2017 at 8:45 pm #399099What do you mean? It’s already implemented on the front end. The functionality already exists. The only thing you’re doing with this is allowing to choose whether the functionality displays on a certain category or not
October 6, 2017 at 10:35 am #399225Lets say you limit a “WiFi” custom field to the “Hotels” category from the backend.
On the front end you select a price package and then it loads all the fields for the price package, do we have to then select a category first before anything else is shown? at what point do we load the custom fields, it would have to be after a category selection or do we just disable them depending on what category is selected?…October 6, 2017 at 11:37 pm #399359If a WiFi field is limited to hotels, then this field should only appear on front end listings under the Hotel category.
So if a user goes to Restaurants, the Wifi field wouldn’t display. If a user goes to restaurants, then the field would display
I’m not very familiar with the pricing package functionality.
October 9, 2017 at 2:18 pm #399636I am more talking about the add listing page, are u suggesting we let them add it but just not show it?
October 9, 2017 at 2:20 pm #399637I think I see what you’re asking
Yes ideally user would select a category first and based on his selection, the proper fields would appear for him to populate. So if a field is not applicable to that category, it wouldn’t even show.
October 10, 2017 at 11:55 am #399813I guess that brings into question do we change the pricing to be by category or keep it as is, then how do we incentivise higher price packages?
What i am getting at is, that its not a simple thing to do, there are many things to take into consideration but if we can find a way to make it work good for everyone then we will implement it, its just finding the right solution.
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket