The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] Showing Dropdowns on Front End Input Form (3 posts)

  1. sammiej
    Posted 2 years ago #

    Hi Rachel,

    Can you tell me what I need to do to get the taxonomy choices to show on a front end submission form?



  2. reportica
    Posted 2 years ago #

    Agreed, if the name of the cpt-created taxonomy is "directory" what is the php for the view or the form? If you could, that would be great.

  3. Rachel Carden
    Plugin Author

    Posted 2 years ago #

    Hey guys...

    Well, learning how to build a form with PHP is something best saved for another forum since we're just dealing with CPT-onomies here but if you need to know how to retrieve term info so you can use the info to build your form, you've come to the right place!

    get_terms() is a great function to use to retrieve your terms so you can use that list to build a form element.

    wp_dropdown_categories() will build a dropdown/select form element for you!

    I'm not really sure what your forms are for but, when you submit the form, you can use wp_set_object_terms() to assign the terms selected in your form.

    CPT-onomies documentation provides explanations and examples for all the functions you can use to interact with your terms.

    If you have any specific troubles with your CPT-onomy terms when you're building the form, let me know and I'll try to help.

    If you're using a form plugin to build your form and you're having issues, let me know what plugin you're using and what exactly you're trying to do and I'll try my best to make sure it's not an issue with CPT-onomies.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic