Skip to:
Content
Pages
Categories
Search
Top
Bottom

2 identical boxes for “You must be logged in to create new topics”

  • @haddlyapis

    Participant

    Hi,
    for some reason, if you are not logged in and you click on a forum post, the login (username and password) box below the text “You must be logged in to create new topics.” is shown twice.
    Any ideas?
    e.g. link_to_my_forum

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

    Moderator

    might well be theme related, does your theme have any bbpress templates in it?

    @haddlyapis

    Participant

    Hi,

    My theme does have a folder for BBpress, but this has not changed for over 4 years and now this issue has come up.

    @robin-w

    Moderator

    I suspect that your theme is using out of date templates, and the new topic/reply forms have a login in them, then old ones didn’t.

    If the list is not massive, can you list the files in that folder?

    @haddlyapis

    Participant

    content-archive-forum.php
    form-search.php
    loop-single-topic.php
    content-single-forum.php
    loop-forums.php
    loop-topics.php

    @haddlyapis

    Participant

    Hi @robin-w , did you have any idea here how to remove the additional login box?
    I have used JS to hide a second login box for now, but this is not a long-term solution.
    is there a function I should be looking for?

    @haddlyapis

    Participant

    could i just add a function in the functions.php file with something like:
    if user_is_logged_in –> don’t show loginbar

    @robin-w

    Moderator

    I think your theme is adding another one in the bbpress templates

    so in 2.6.x they are added in

    \bbpress 2.6.6\templates\default\bbpress\form-reply.php
    \bbpress 2.6.6\templates\default\bbpress\form-topic.php

    so your have 2 choices

    a. the better one
    Look in each of the files you listed as being bbpress in your themes template and look for a line which says something like

    bbp_get_template_part( 'form', 'user-login' );

    and edit out this line

    b. If you can’t find it there, then

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

    transfer this to your pc and edit

    remove the line which says

    <?php bbp_get_template_part( ‘form’, ‘user-login’ ); ?>

    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

    Repeat this for form-topic.php

    @haddlyapis

    Participant

    Great Robin. Thx so much for this. Did B option, as couldn’t find the function. Either way, can remove my JS and this has worked. Sorry for the late reply. This topic is now closed.

    @robin-w

    Moderator

    🙂

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