Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


  • haddlyapis
    Participant

    @haddlyapis

    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 7 replies - 1 through 7 (of 7 total)

  • Robin W
    Moderator

    @robin-w

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


    haddlyapis
    Participant

    @haddlyapis

    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

    @robin-w

    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

    @haddlyapis

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


    haddlyapis
    Participant

    @haddlyapis

    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

    @haddlyapis

    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

    @robin-w

    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

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