Skip to:
Content
Pages
Categories
Search
Top
Bottom

Taxonomies for Topics


  • demi4444
    Participant

    @demi4444

    Hello,
    I’m looking for some help adding taxonomies dropdown selectors for Topics (in frontend).
    I understand I can treat Topics as custom post type. So I added my taxonomies with register_taxonomy() without any problem.

    Now I need to add these taxonomies selectors in frontend form (in New Topic Form / Edit Topic form)

    Can anyone give me some help please?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

    transfer this to your pc and edit as needed

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php

    bbPress will now use this template instead of the original


    demi4444
    Participant

    @demi4444

    Thank you Robin,

    I created form-topic.php in my theme and added my taxonomies dropbox in the new/edit topic form.
    The form is the original one

    <form id=”new-post” name=”new-post” method=”post”>

    Can you explain me in which file the system saves the data sent on submit?
    And how to override or extend the save topic method to save also the values of the custom taxonomies?
    Thank You!!!!


    Robin W
    Moderator

    @robin-w

    This article explains it quite well and the save hooks

    add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 );
    add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 );

    are still there

    https://wp-dreams.com/articles/2013/06/adding-custom-fields-bbpress-topic-form/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar