Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create/add forum from frontend

  • @inderpreet2018

    Participant

    Hi,

    I used below code to add forum from frontend for Moderator user in my child-theme function file, but nothing works and showed on frontend.

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

    Please help me to sort out this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @robin-w

    Moderator

    the issue is with the ‘ the code has been copied via another program and is using the wrong ones

    copy this below

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

    the form is shown on the moderators profile

    @inderpreet2018

    Participant

    I used above code as you said. But I don’t get any forum form on my profile
    2018-10-14_1902

    Screenshot for code
    2018-10-14_1905

    @robin-w

    Moderator

    the screenshot says that you are using buddypress and the buddypress profile as well, and that code is just for bbpress.

    If you paste your reply immediately above on the buddypress support site, someone should be able to tell you the correct add_action to hook to buddypress profile

    https://buddypress.org/support/

    @inderpreet2018

    Participant

    Thanks for your reply. I will ask buddypress.

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