• Resolved Mark Zeng

    (@lesliechw)


    Hello UM Support Team,

    I’m customizing Profile Page and I would like to have content of each tab to be display on different section on Profile Page.

    Is that possible? Any documentation for that? Please advice, thanks in advance.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lesliechw

    You can try this action hook to display the tab content:

    $tab_slug = "posts";
    do_action("um_profile_content_{$tab_slug}", $args );
    
    $tab_slug = "comments";
    do_action("um_profile_content_{$tab_slug}", $args );

    $tab_slug is the navigation slug in the URL.

    Ensure that the tabs are enabled in the WP Admin > Ultimate Member > Settings > Appearance > Profile Menu.

    Regards,

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Thanks again for your help. I will try it and update the result here.

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Thank you very much. It worked!

    One thing I don’t understand is why:

    This work

    <?php
    $tab_slug = "posts";
    do_action("um_profile_content_{$tab_slug}", $args );
    ?>

    This doesn’t work

    <?php
    do_action("um_profile_content_{'posts'}", $args );
    ?>
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lesliechw

    It won’t work because there’s a syntax error.

    You can try this single line:
    do_action("um_profile_content_posts", $args );

    Regards,

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Thanks again, Very much appreciated.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lesliechw

    Thanks for letting us know. I am closing this thread now.

    Regards,

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Hi,

    Sorry I just tested “photos” is not working.

    I use the following code hoping to display the photos gallery but nothing shown up.

    $tab_photos = "photos";
    do_action("um_profile_content_{$tab_photos}", $args );

    Please help.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lesliechw

    Have you enabled the tab in the Profile Menu settings?

    Regards,

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Yes, the Photos Tab is enabled. In the URL if I access the Tab manually by URL, the content shown as expected. But not by the code when on default Profile Page.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lesliechw

    You can try the shortcode but we cannot discuss issues related to the Premium plugins in the free support forum. Could you please submit a ticket via our website? https://www.ultimatemember.com/support/

    Regards,

    Thread Starter Mark Zeng

    (@lesliechw)

    @champsupertramp Ok noted and thanks for your help. Anyway, I’ve decided to change the way to handle Photo Gallery is by using multiple Image Upload fields on Profile Form as replacement for gallery. That has some benefits over the actual Photos plugin.

    Thanks for your help again, really appreciate it very much.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Shown Tabbed content on different section of Profile Page’ is closed to new replies.