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:
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)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Shortcode to custom tab?’ is closed to new replies.