WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] How do I change the page you are directed to (7 posts)

  1. nigelpengelly
    Member
    Posted 2 years ago #

    After you've logged in using wp-members, I'd like the user to go to a page I've set up.

    At present it just goes to the homepage of my website.

    Any ideas, anyone?

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, there is a filter hook for that.

    <?php
    add_filter( 'wpmem_login_redirect', 'my_login_redirect' );
    
    function my_login_redirect()
    {
    	// return the url that the login should redirect to
    	return 'http://yourdomain.com/your-page';
    }
    ?>
  3. Brian KD
    Member
    Posted 1 year ago #


  4. marcacer
    Member
    Posted 1 year ago #

    Where do I need to put this filter hook? In which file after which line?

  5. Brian KD
    Member
    Posted 1 year ago #

    Theme's function.php, or you could do this:

    http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users

    which is better so it won't get updated over by Theme/Plugin updates.

    Regards,
    -Brian

  6. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    While yes you could do that, I wouldn't necessarily say that is "better" because it doesn't address the bigger issue - you should be making all theme customizations (including functions.php) in a child theme for the specific reason that you don't want theme updates to overwrite your changes.

    http://rocketgeek.com/basics/wordpress-site-management-best-practices/

    (But from an ease of use standpoint - a functions plugin file is a good idea of you want everything to be easily transportable across themes.)

  7. Brian KD
    Member
    Posted 1 year ago #

    Thanks Chad,

    I use the functions plugin exactly for the ease of using on multiple sites, but with a little effort a Child Theme would probably be just as easy. I'll have to look into the Child Themes. Regards,

    -Brian

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.