WordPress.org

Ready to get started?Download WordPress

Forums

BP My Home
[resolved] My profile as My Home by default (4 posts)

  1. investacube
    Member
    Posted 8 months ago #

    Hi, yet another question I'm afraid. Is it possible to set members profile page as their landing page by default but allow them to deactivate on the front end? I haven't explained that very well but if possible I want it to work almost in reverse of the current settings

    http://wordpress.org/plugins/bp-my-home/

  2. imath
    Member
    Plugin Author

    Posted 8 months ago #

    Hi,

    I suggest you to set the usermeta on first member login using this code in the functions.php of your active theme :

    function investacube_set_myhome_page_at_first_login( $user_id ) {
    	bp_update_user_meta( $user_id, 'bpmh_user_home_page', 1 );
    }
    
    add_action( 'bp_first_activity_for_member', 'investacube_set_myhome_page_at_first_login', 10, 1 );

    Old members won't be affected, but new one will.

  3. investacube
    Member
    Posted 8 months ago #

    Sorry to sound so stupid but what line do I put it on - at present the functions.php of my theme file (Infinity) has code on lines 1-23 of 24. Am I in the right place and do I put your code at the end?

  4. imath
    Member
    Plugin Author

    Posted 8 months ago #

    Just before the ?> closing tag if any but yes at the end.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.