Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove topic creation in frontend


  • newtech1
    Participant

    @newtech1

    I do not want anyone, including members, to be able to post topics on the frontend of the forum, just through backdoor. How do I remove that option? It appears the code is form-forum.php file but cannot determine what code I need to remove. What I have tried keeps giving me ‘page not found’.remove front end posting

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

  • Robin W
    Moderator

    @robin-w

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

    transfer this to your pc and edit

    make the file read

    <?php
    
    /**
     * New/Edit Topic
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;
    
    if ( ! bbp_is_single_forum() ) : ?>
    
    <div id="bbpress-forums" class="bbpress-wrapper">
    
    	
    
    </div>
    
    <?php endif;

    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


    newtech1
    Participant

    @newtech1

    Are you saying that I am to replace all of the code in form-topic.php with just this code:
    `<?php

    /**
    * New/Edit Topic
    *
    * @package bbPress
    * @subpackage Theme
    */

    // Exit if accessed directly
    defined( ‘ABSPATH’ ) || exit;

    if ( ! bbp_is_single_forum() ) : ?>

    <div id=”bbpress-forums” class=”bbpress-wrapper”>

    </div>

    <?php endif;’

    If so the when I go to my forum page it says ‘page not found’.


    Robin W
    Moderator

    @robin-w

    ok, not quite sure why, but in that case

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php

    transfer this to your pc and edit

    take out the line

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    which is in twice, so remove 2 times

    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/content-single-forum.php

    bbPress will now use this template instead of the original


    newtech1
    Participant

    @newtech1

    That works. 🙂


    newtech1
    Participant

    @newtech1


    Robin W
    Moderator

    @robin-w

    ok, both those links work for me


    newtech1
    Participant

    @newtech1

    stupid me, I forgot I had made the forum private w=in a test I was doing, it works fine.


    Robin W
    Moderator

    @robin-w

    great – glad we got there !!

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