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
  • Author
    Posts
  • #398836

    byalik
    Lifetime Member
    Post count: 78

    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.

    #398861

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    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

    #398862

    byalik
    Lifetime Member
    Post count: 78

    I’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:
    Courses

    Then 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 4

    Each of those categories may need separate field

    #398872

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If 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

    #398874

    byalik
    Lifetime Member
    Post count: 78

    Based 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

    #398952

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Adding the functionality to the backend it easy, how to implement it on the add listing form is the question 🙂

    Stiofan

    #399099

    byalik
    Lifetime Member
    Post count: 78

    What 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

    #399225

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Lets 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?…

    #399359

    byalik
    Lifetime Member
    Post count: 78

    If 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.

    #399636

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I am more talking about the add listing page, are u suggesting we let them add it but just not show it?

    #399637

    byalik
    Lifetime Member
    Post count: 78

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

    #399813

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I 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

Viewing 12 posts - 1 through 12 (of 12 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket