UsersWP Profile Tabs

This topic contains 2 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #4135

    Fernando Brenes
    Buyer
    Post count: 16

    Hi,

    I was reading and I understand we can add tabs to UsersWP Profile page by adding a fieldset, assing it to Profile own page and then add another field assigned to the fieldset.

    That’s clear. The tab is created however, inside of the tab I want for all users to put a shortcode and I’m not sure if it’s possible? Basically, when I click on a specific tab in the profile page I want to add a shortcode to display some information that I need.

    Is this possible?
    Thank you,
    Best Regards

    #4136

    Fernando Brenes
    Buyer
    Post count: 16

    Hi,

    Never mind 🙂 I find it

    add_filter(‘uwp_profile_tabs’, ‘uwp_add_profile_custom_tabs’, 10, 3);
    function uwp_add_profile_custom_tabs($tabs, $user, $allowed_tabs) {

    $tabs[‘citas’] = array(
    ‘title’ => ‘Mis Citas’,
    ‘count’ => 1
    );

    return $tabs;
    }

    add_action(‘uwp_profile_citas_tab_content’, ‘uwp_add_profile_citas_tab_content’);
    function uwp_add_profile_citas_tab_content($user) {
    echo do_shortcode(‘[shortcode]’);
    }

    #4138

    Alex Rollin
    Moderator
    Post count: 27815

    Excellent! And thanks for sharing!

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket