Skip to:
Content
Pages
Categories
Search
Top
Bottom

Login URL

  • @mushlih

    Participant

    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

    so what should the url be ?

    I’ll then give you some code

    @robin-w

    Moderator

    actually where are you wanting to redirect from ?

    eg from the create topic/reply or somewhere else ?

    @mushlih

    Participant

    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

    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

    @mushlih

    Participant

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

    @robin-w

    Moderator

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

    @mushlih

    Participant

    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

    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

    @mushlih

    Participant

    Ok, thank you

    @mushlih

    Participant

    Whats your mean from “activate 15 items”?

    @robin-w

    Moderator

    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

    @mushlih

    Participant

    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

    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

    @mushlih

    Participant

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

    Sorry, I don’t have a child theme

    @robin-w

    Moderator

    or use code snippets !!

    @mushlih

    Participant

    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