WordPress.org

Forums

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

  1. sammiej
    Member
    Posted 1 year 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?

    Thanks
    Sam

    http://wordpress.org/plugins/cpt-onomies/

  2. reportica
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags