• A custom tab I have on the profile page on my site has disappeared with the recent update of UM. It is no longer visible on the profile page or within UM > Settings > Appearance > Profile Menu. Although, a second custom tab is still visible. I’m not super well versed in PHP, and was hoping you might be able to tell me if you see an error in the code.

    
    
    /* ULTIMATE MEMBER: ADD NEW SUGGESTIONS TO PROFILE PAGE */
    /* First we need to extend main profile tabs */
    /* Then we just have to add content to that tab using this action */
    
    add_action('um_profile_content_newsuggest_default', 'um_profile_content_newsuggest_default');
    function um_profile_content_newsuggest_default( $args ) {
    	$url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    	
    	//because the actions are still running in the dashboard
    	$url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    	if (strpos($url, '/profile/') !== false) {
    		$temp = explode("/profile/",$url);
    		$userid = explode("/",$temp[1]);
    	
    		if (get_current_user_id() == $userid[0]) {
    			echo do_shortcode('[user-submitted-posts]');
    		}
    	}
    	
    
    }
    

    Appreciate any help you might be able to provide.

  • The topic ‘Custom Profile Tab Disappeared’ is closed to new replies.