Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding some text before new topic box

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

  • Robkk
    Moderator

    @robkk

    Use the hook <?php do_action( 'bbp_template_notices' ); ?> or even <?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>

    And here is an example for a custom notice. You can of course add a list, but you would need to style it with some CSS.

    function rkk_add_notice_before_topic_form() {
        ?>
            <div class="bbp-template-notice important">
              <p>
                 <strong>IMPORTANT!:</strong> Make sure to read our site's <a href="http://yoursite.com/discussion-policy"> discussion policy</a> before you post.
              </p>
            </div>
        <?php
     }
     add_action( 'bbp_theme_before_topic_form_notices', 'rkk_add_notice_before_topic_form' );

    tech55541
    Participant

    @tech55541

    Hello,
    I did some customizing, here is the end result.

    Code in functions.php

    function rkk_add_notice_before_topic_form() {
    ?>
    <div class="bbp-before-posting">
    <p>
    Before Posting
    <br>
    Please read these steps carefully, it helps staff and other members like you to have a nice and enjoyable time on our forum.
    <br>
    A: Please read the
    <br>
    <a href="http://yourtechadvisors.com/forum-rules">Forum Rules.</a>
    <br>
    B: Please explain your problem in detail so we can get a good understanding of your problem and how to help you.
    <br>
    C: If you need help with a TV, don't just write "I need help with a Samsung." Give us some more detail "I need help with a Samsung TV model L-55-22."
    </p>
    </div>
    <?php
    }
    add_action( 'bbp_theme_before_topic_form_notices', 'rkk_add_notice_before_topic_form' );

    CSS

    .bbp-before-posting {
        background-color: blue;
        color: white;
        font-size: 16px;
    }
    .bbp-before-posting a {
        color: yellow;
    }

    Thanks.

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