drop the following into your functions.php file:
function my_login_redirect(){
return home_url().'/activity';
}
add_filter("login_redirect", "my_login_redirect", 10, 3);
that is after login,
to change home page, what are you using for your home page button?
You’ll need to use is_user_logged_in()
and output a different a href depending on the result. You’ll also want to hardcode the menu link into your template (ie: not use the wp nav menu for home buttons) take a look at header.php!
hope this helps.
I’m doing this with a wp plug in called Menu Items Visibility Control in conjunction with s2member.
Once it’s activated, Go to the menu area, click the drop down on the Home menu item name and under visablilty do your conditional.
Mine looks like this. (! at the beginning means they can’t) So when they are logged in the menu item won’t appear.
!current_user_can(‘access_s2member_level1’)
Sorry I don’t know exactly what you would put unless you have s2member
thanks for sharing slyviavie, is nice there is a plugin for this.
you are welcome Matt there is one for Widgets that works similarly. show or hide them based on users log in status. That one is called “Widget Logic” same type of thing, drag and drop your widget, then set the conditional.
I dont use any home buttom or menu for homepage.my site usage header (included link) for homepage in frisco theme.by the way thanks both of you for your advice. I will try this,then tel you.
There’s a plugin that redirect user to their profile activity when logged.
link here: https://wordpress.org/plugins/bp-redirect-to-profile/
I have already rewrite the login and logout rules.i am trying to restrict homepage only for logedin users (not admin) and redirect them to another bp page when they try to go on homepage like facebook style homepage.