Skip to:
Content
Pages
Categories
Search
Top
Bottom

BBPress Front-End Add Forum


  • jorgemuyden
    Participant

    @jorgemuyden

    Hello Everyone,

    I have a site were users can add topics on Forums. But is there a way that the Admin adds/edits/delete new Forums on the front-end?

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

  • Robkk
    Moderator

    @robkk

    There is a shortcode you can put in a page to allow users to create forums.

    [bbp-forum-form]

    Shortcodes

    You can also use this PHP code snippet, and place it in your child themes functions.php file or in a functionality plugin to allow admins/keymasters to create a forum right from their bbPress forum profile.

    function ntwb_bbp_forum_form() {
    	if ( bbp_is_user_home() && current_user_can( 'edit_others_forums' ) ) {
    		echo do_shortcode( '[bbp-forum-form]' );
    	}
    }
    add_action( 'bbp_template_after_user_profile', 'ntwb_bbp_forum_form' );

    To delete and edit you have to do it in the backend for now. There are plans to add more frontend moderation tools though.


    Pascal Casier
    Moderator

    @casiepa

    Technically possible as Robkk indicates, ok, but just make sure to keep it under control.
    I’m not sure what maximum number of forums has been tested for visualization and handling inside the different shortcodes and functions.

    Pascal.


    jorgemuyden
    Participant

    @jorgemuyden

    Thank you very much. I am waiting for the Edit and Delete button.
    Again thank you for the help and have a nice day 😉


    Robkk
    Moderator

    @robkk

    Yes as @casiepa said there is a limit of forums that can be displayed on the forum root page on yoursite.com/forums by default, and it is 50. It is because you do not really need to use more than 50 forums on your site and it is encouraged that you would need to structure your forums a little better. It is filterable to display more on the forum archive though.


    @jorgemuyden

    Glad you are sorted on the create forum form. While there is no edit and delete button from the frontend, if you are using the WordPress toolbar on your site, if you go to a single forum you should see an edit forum menu item in the toolbar that leads to the backend, if you edit the forum you can also trash it from there too. Hopefully that will help a little bit.


    jorgemuyden
    Participant

    @jorgemuyden

    Yes thank you for the tip. The Admin will just add 30 Forums maybe 40 not more then that.
    But i wanted to give him the option to add Forums through the Front-end. So that problem is solved.


    evanevans333
    Participant

    @evanevans333

    Does this code still work? I tried it and am not seeing any results. I would like to be able to create sub-forums on the front end (as Admins/Mods).


    Robkk
    Moderator

    @robkk

    @evanevans333

    It should still work.

    The function I posted only works on bbPress forum profiles, if the currently logged on user has the edit_other_forums capability, that they are viewing it on their own profile, and if you have the available hooks if you are using custom bbPress templates.


    dredarsenic
    Participant

    @dredarsenic

    Hi there, my issue is similar to this, but maybe you can enlighten me.

    I’m using bbPress for the forum on my site.

    On the front end, users should be able to submit a topic on a forum, when they try, they get a “A name is required for this term.” error, I have already reset the forum, but still has the same thing.
    Also the despite that message, the topic will appear in the WP admin dashboard under Topics, but will never show in the forum on the front end, I would like the topic created by users on the front end to appear immediately in the front end as well, any idea of code I can add to the functions.php of the theme or anything I can do ?

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