Title: Shortcode to custom tab?
Last modified: March 26, 2024

---

# Shortcode to custom tab?

 *  Resolved [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/)
 * Hello. I’ve added another tab to my Profile which i wanted once clicked, to show
   the content of certain shortcode, but looks like it does not want to make the
   shortcode to work. I see the text of the shortcode once i click on that tab. 
   Here is the code:
 *     ```wp-block-code
       function um_mycustomtab_add_tab( $tabs ) {
           $tabs['mycustomtab'] = array(
               'name' => 'История на гледане',
               'icon' => 'um-faicon-film',
               'custom' => true
           );
   
           UM()->options()->options['profile_tab_' . 'mycustomtab'] = true;
   
           return $tabs;
       }
       add_filter('um_profile_tabs', 'um_mycustomtab_add_tab', 1000);
   
       function um_profile_content_mycustomtab_default( $args ) {
           // Поставете вашия shortcode тук. Пример:
           echo do_shortcode("[ts-history-page perpage='10' style='2']");
       }
       add_action('um_profile_content_mycustomtab_default', 'um_profile_content_mycustomtab_default');
       ```
   
 * How can i make this shortcode: [ts-history-page perpage=’10’ style=’2′] , to 
   work and i can see the content of it? It works fine in pages.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/#post-17530724)
 * [@qnkov](https://wordpress.org/support/users/qnkov/)
 * > I see the text of the shortcode once i click on that tab
 * Your shortcode snippet is not found so WP has no PHP code to execute.
 *  Thread Starter [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/#post-17532568)
 * [@missveronicatv](https://wordpress.org/support/users/missveronicatv/)
 * It does work if it’s on page. I can view the content of it. So how to fix that?
 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/#post-17532670)
 * [@qnkov](https://wordpress.org/support/users/qnkov/)
 * Install the shortcode snippet as you have done with the above code snippet.
 * I made a test of your shortcode by adding this to your code and it’s working 
   very well.
 *     ```
       add_shortcode( 'ts-history-page', 'ts_history_page_shortcode');
       function ts_history_page_shortcode( $atts, $content ) {
   
           return 'Test perpage = ' . $atts['perpage'] . ' and style = ' . $atts['style'];
       }
       ```
   
    -  This reply was modified 2 years, 2 months ago by [missveronica](https://wordpress.org/support/users/missveronicatv/).
 *  Plugin Support [andrewshu](https://wordpress.org/support/users/andrewshu/)
 * (@andrewshu)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/#post-17541942)
 * Hi [@qnkov](https://wordpress.org/support/users/qnkov/)
 * This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to re-open this thread if any other questions come up and we’d
   be happy to help. 🙂
 * Regards

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shortcode to custom tab?’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [andrewshu](https://wordpress.org/support/users/andrewshu/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-to-custom-tab/#post-17541942)
 * Status: resolved