Adding custom fields to Site Categories?

I want to add a date and location field to the sites categories. Any suggestions on how to do that?

Ken...

  • ken_pettit

    @aristath,
    Right now I am using Site Categories to display sites that are Performers, Studios, Vendors. I would also like to use it to display Events, but, in date order. Currently I am playing with Events+ but it creates a separate workflow and different results then all of the other site types. All other site types link to the sites home page whereas Event+ links to the actual event record within the site...

    I know this is not an error with the plugin but a specific extension desired by me. Just looking for pointers. Can it be achieved with Custom Press? Digging into the code right now looking for possibilities there.

    Thanks,
    Ken...

  • Paul

    @ken_pettit,

    Not really advisable to to that directly via the Site Categories plugin. But you might be able to figure out something.

    To give you a clue on the inner workings of the plugin. It creates/registers a custom taxonomy on the main site. This taxonomy 'bcat' is where all the categories are managed. We have for example added a custom field which is the image for the category but this is not very well managed since it is stored as an array in the options table.

    So using standard WordPress hooks you should be able to at least add your custom fields to the Site Category term form. Then when the form is submitted you would need to handle capture of the custom field and store it in some manor. Then within the query for sites associated with site category terms you would need to perform your own query to pull in the associated custom field data you stored in the previous step.

    It can be done and would be totally outside of the plugins use. Again the plugin is for designation of a Site within a Multisite system to some high level categories. You should be able to find some other solution.

  • aristath

    Hello there!
    As we haven't heard back from you we're going to assume the problem was sorted out and mark this thread as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and, as always, for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.