Support » Plugin: Gravity Forms Sticky List » Show own entries in Ultimate Member Profile tab

  • Resolved grimbuehler


    I like to show a order history tab for the current user in Ultimate Member profile page tab. How and where to embed the sticky link shortcode in this case. I tryed it in functions.php, but I’m missing something…
    My code:

    /* extend main profile tabs */
    add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 );
    function add_custom_profile_tab( $tabs ) {
    	$tabs['mycustomtab'] = array(
    		'name' => 'History',
    		'icon' => 'um-faicon-pencil',
    		'custom' => true
    	return $tabs;		
    /* make our new tab hookable */
    add_action('um_account_tab__mytab', 'um_account_tab__mytab');
    function um_account_tab__mytab( $info ) {
    	global $ultimatemember;
    	extract( $info );
    	$output = $ultimatemember->account->get_tab_output('mytab');
    	if ( $output ) { echo $output; }
    /* add some content in the tab */
    add_filter('um_account_content_hook_mytab', 'um_account_content_hook_mytab');
    function um_account_content_hook_mytab( $output ){
    	<div class="um-field">	
    	<?php echo do_shortcode( "[stickylist id='1' user='" . $user_id . "']"); ?>		
    	$output .= ob_get_contents();
    	return $output;

    Thank you for your feedback.
    Best, Marcel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author fried_eggz


    In this line:

    <?php echo do_shortcode( "[stickylist id='1' user='" . $user_id . "']"); ?>

    …you need to make sure that the vaiable $user_id holds the id of the currently viewed user.

    Ok, I see. Thank you. It works now.
    Best; M

    Plugin Author fried_eggz


    No problem. If you like the plugin, please consisted writing a short review. Thank you.

    Hey guys,

    May i know what did the trick for the displaying the content on the profile tab as @grimbuehler is doing? i tried to call $user_id = get_current_user_id(); but it didn’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show own entries in Ultimate Member Profile tab’ is closed to new replies.