Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add Favorite Posts to Ultimate Member User Profile Tabs in WordPress
// Customize Profile Tabs
/* add a custom tab to show user pages */
add_filter('um_profile_tabs', 'pages_tab', 1000 );
function pages_tab( $tabs ) {
$tabs['pages'] = array(
'name' => 'Favorite Posts',
'icon' => 'um-faicon-star',
'custom' => true
return $tabs;
/* Tell the tab what to display */
add_action('um_profile_content_pages_default', 'um_profile_content_pages_default');
function um_profile_content_pages_default( $args ) {
global $ultimatemember; ?>
<?php echo do_shortcode('[user_favorites user_id="" include_links="true" post_types="post" include_buttons="false"]'); ?>

This comment has been minimized.

Copy link
Owner Author

@chellestein chellestein commented Nov 2, 2015


This comment has been minimized.

Copy link

@qnkov qnkov commented Jun 9, 2018

Hi. Where i need to put this code so it will work? Which file? Thanks. I have both plugins. I want to active favorites in ultimate member.

I will be waiting for answer. Please.


This comment has been minimized.

Copy link

@aliTalaea aliTalaea commented Mar 24, 2019

Hi Michelle, can you tell where to apply this code please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.