Skip to:
Content
Pages
Categories
Search
Top
Bottom

Login URL

  • Hi
    I have a login page for my users (generated by one of my plugins). however, when I download bbpress, it directs users to login on WordPress deafult log in page, how can I change the login page for my users to the login page generated by one of the other plugins?
    Thank you

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

  • Robin W
    Moderator

    @robin-w

    so what should the url be ?

    I’ll then give you some code


    Robin W
    Moderator

    @robin-w

    actually where are you wanting to redirect from ?

    eg from the create topic/reply or somewhere else ?

    This is the login URL for my user:

    Login

    I want to direct from the create topic and also reply, and all the links (which is in the bbpress plugin) that redirect the login to my WordPress deafult


    Robin W
    Moderator

    @robin-w

    the simplest way would be to just take out the bbpress login

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

    transfer this to your pc and edit to just delete all the content (or you could put a link to your page)

    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-user-login.php

    bbPress will now use this template instead of the original

    Sorry, I don’t really understand code, is there another way? Or can you simplify your explanation?
    Thank you very much


    Robin W
    Moderator

    @robin-w

    sorry, bbpress uses the standard wordpress login api, so it is code if you want to do something different

    Hi
    My intention is not to change the login template, but to change the login URL, because I already have a login page for my users, is there a more flexible method?


    Robin W
    Moderator

    @robin-w

    given that you don’t understand code, then the best I can offer is to remove the bbpress login from the topic and reply forms.

    This can be done by installing

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Topic/Reply Form and activate item 15

    Ok, thank you

    Whats your mean from “activate 15 items”?


    Robin W
    Moderator

    @robin-w

    I said ‘activate item 15’

    so go to

    dashboard>settings>bbp style pack>Topic/Reply Form

    and you will see a list of 15 items, you want to go to item number 15

    Then how do I make it when the user clicks “log in” on the text: “You must log in to create a new topic” he redirected to my login page, not login deafult wordpress?


    Robin W
    Moderator

    @robin-w

    if you update to bbp-style-pack 4.5.9 and then

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    add_action ('bsp_form_topic_login' , 'rew_redirect' ) ;
    add_action ('bsp_form_reply_login' , 'rew_redirect' ) ;
    
    function rew_redirect () {
    	if ( ! is_user_logged_in() ) {
    		echo '<ul><li><a href="http://www.mysite.com/login">Click here to log in</a></li></ul>' ;
    	}
    }

    amending the url to what you want, and amend the text as well if you want to

    “Put this in your child theme’s function file –”

    Sorry, I don’t have a child theme


    Robin W
    Moderator

    @robin-w

    or use code snippets !!

    Ok, thank you very much

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