Skip to:
Content
Pages
Categories
Search
Top
Bottom

Alternative to “You must be logged in…”


  • Stefano Lissa
    Participant

    @satollo

    Hi, on form-topic.php template file, if the current user cannot create a topic (for example when it is not logged in and it is a required condition) a notice is shown. It would be very helpful to have a hook to replace such message for example with an invitation to register (linking the registration page for example or offering the in place registration).

    It’s possible in new version to add a hook for that?

    Actually the bbp_template_after_single_topic hook can be added, but the notice is shown (and since it has not a specific class, it cannot be hidden via CSS or other notices will be hidden as well).

    Thank you, Stefano.

Viewing 1 replies (of 1 total)

  • Robkk
    Moderator

    @robkk

    You can copy the form-topic.php into your theme/child theme into a folder called bbpress to customize the file used on your site.

    Theme Compatibility

    You can scroll all the way to the bottom of the file, and replace the current message

    <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
        <div class="bbp-template-notice">
            <p>You must be <a href="<?php echo site_url('/wp-login.php') ?>">logged in</a> or <a href="<?php echo site_url('/wp-login.php?action=register') ?>">registered</a> to create new topics.</p>
        </div>
    </div>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar