• Hi, I’ve got a problem with wp-redirect, it was working perfectly but since I update, not anymore.

    Users has a custom tabs which make a redirect to the admin page, the capability for this user is set done, it has access to admin.

    So the problem is that when the user goes to this tabs, the redirect doesn’t do nothing.

    Is there any problem between ultimate member and wp_redirect ?

    (I already try another template and unset every plgins.

    thanks a lot J

Viewing 6 replies - 1 through 6 (of 6 total)
  • I already try another template and unset every plgins.

    So, you already tested for theme and plugin conflict and found no issues? That is, no matter what you unplug the UM tab doesn’t redirect for you?

    Do you have any cache plugins active and have you cleared cache?

    Thread Starter Julien Cousin

    (@jcousin)

    Hi and thanks for helping me.

    Yes, I tried to deactivated everything but still not working and no cache plugin.
    It was working fine but since I don’t know what or when, not anymore.

    When I click on the tabs (which should redirect me the back office) it send me to the profile, but shows me only the header.

    Can it be a session problem ?

    I am sorry but I don’t know what you mean by the “office”. Also, if this is another plugin you are relying to do redirections with, then we can not provide support for that.

    In any case, I am not sure of the nature of your problem other than you are not redirected to a different address location when you click on a tab.

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi

    Can you please provide the custom tabs and wp_redirect code here so we can investigate?

    Thanks.

    Thread Starter Julien Cousin

    (@jcousin)

    Here is the code, thanks.

    add_filter('um_profile_tabs', 'add_custom_profile_tab', 20 );
    function add_custom_profile_tab( $hisTab ) {	
    	
    	$hisTab['reforma'] = array(
    		'name' => 'Nueva reforma',
    		'icon' => 'um-icon-ribbon-a'
    	);
    }
    
    add_action('um_profile_content_reforma_default', 'um_profile_content_reforma_default');
    function um_profile_content_reforma_default( $args ) {		
    	wp_redirect(site_url().'/wp-admin/post-new.php');	
    	exit;
    }
    Thread Starter Julien Cousin

    (@jcousin)

    I’ve check the code, but doesn’t work.

    And thats strange, because I have this code in many website and it’s working.
    The exact code is:

    add_filter('um_profile_tabs', 'add_custom_profile_tab', 20 );
    function add_custom_profile_tab( $hisTab ) {	
    	$hisTab['abogado'] = array(
    		'name' => 'Mi Abogado',
    		'icon' => 'um-icon-university'
    	);		
    	
    	return $hisTab;
    }
    
    add_action('um_profile_content_abogado_default', 'um_profile_content_abogado_default');
    function um_profile_content_abogado_default( $args ) {		
    	$profile_id = um_profile_id();	$IdAbogado = get_user_meta($profile_id, 'AbogadoId', true);
    	$nicename = get_user_meta($IdAbogado, 'nickname', true);
    	wp_redirect(site_url().'/mi-cuenta/'.$nicename);	
    	exit;
    }
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Redirect’ is closed to new replies.