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?
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?
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';
}
?>Where do I need to put this filter hook? In which file after which line?
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
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.)
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
You must log in to post.