Skip to:
Content
Pages
Categories
Search
Top
Bottom

Prevent topic replies


  • newtech1
    Participant

    @newtech1

    I cannot find anywhere I can prevent replies to a topic. I do not want users to have the ability to reply to a topic. It appears there is no way to do this. Is there a bbpress plugin that will give me that ability? If not, what file can I edit to remove the reply form from showing up after someone posts a topic?

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

  • Robin W
    Moderator

    @robin-w

    so you want to auto-close a topic after it has been posted – yes?


    newtech1
    Participant

    @newtech1

    Yes that is correct.


    newtech1
    Participant

    @newtech1

    I need to clarify. I do not want the reply option to appear anywhere in the forum. I do not want the option for replies-just turn off the reply feature.

    If I cannot turn off the reply form what file do I go into to remove the code for the reply form so it does not show up?

    The problem with making topic closed is it greys out the topic title. I do not want the title to grey out. So if I cannot remove the reply form someway how can I prevent the title from turning grey when closed?

    closed topic


    Robin W
    Moderator

    @robin-w

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

    transfer this to your pc and edit

    make the file read

    <?php
    
    /**
     * New/Edit reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;

    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-reply.php

    bbPress will now use this template instead of the original


    newtech1
    Participant

    @newtech1

    Are you saying to replace the existing code in form-reply.php just with this code? If so my forum page is ‘page not found’.

    <?php
    
    /**
     * New/Edit reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;

    I believe this shoudk end with
    <?
    but it still does not work.


    Robin W
    Moderator

    @robin-w

    and with this one try

    content-single-topic.php

    and remove the line

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


    newtech1
    Participant

    @newtech1

    it works, thanks


    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