Title: Shortcode not working in Tabs
Last modified: May 10, 2023

---

# Shortcode not working in Tabs

 *  Resolved [Elton Heta](https://wordpress.org/support/users/eltonheta/)
 * (@eltonheta)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/)
 * I’m trying to use some shortcodes inside the tab element of Elementor Kit and
   it doesn’t work, only the first shortcode works and the others don’t open.
   How
   can I solve this problem?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-not-working-in-tabs%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Md Abdullah Al Arif](https://wordpress.org/support/users/faithcoder/)
 * (@faithcoder)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-16737445)
 * Hi [@eltonheta](https://wordpress.org/support/users/eltonheta/),
 * Thanks for contacting us.
 * I’ve checked the Tab widget with Shortcode, it seems fine on my end ([screencast](https://d.pr/v/mZxcMf)).
   Three tabs with different shortcode template work fine. I would request you to
   check your shortcode to another area if it works.
 * In the meantime you can run a conflict test in your environment.
 * To do so, first of all, switch your theme to a default theme like **2020 or Hello
   Elementor** and check if the issue still persists. If that solves your issue,
   that means the issue is related to the theme you are using.
 * If switching to the default theme also doesn’t help, please check for any conflicts
   between the installed plugin. To troubleshoot the issue, please deactivate other
   plugins except for **Elementskit and Elementor** to check if the issue still 
   persists. If that solves your problem, activate the plugins one by one, and continue
   checking the issue In this way you will be able to detect which one causes the
   problem.
 * Let us know your update, please.
 * Regards,
 * Arif
 *  Thread Starter [Elton Heta](https://wordpress.org/support/users/eltonheta/)
 * (@eltonheta)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-16737457)
 * Thanks, but I solved it, the problem was with CSS, when I clicked on the second
   tab, the height of the images became 0, and as a result, it didn’t work.
 *  [realmoca](https://wordpress.org/support/users/realmoca/)
 * (@realmoca)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-17168294)
 * Hello Elton, where did go to fix the error? I have te same issue but I don’t 
   know where I can fix the image height.
 * Greetings.
 * Rene Morice
 *  [themarkboogie](https://wordpress.org/support/users/themarkboogie/)
 * (@themarkboogie)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-17182377)
 * [@eltonheta](https://wordpress.org/support/users/eltonheta/) or [@realmoca](https://wordpress.org/support/users/realmoca/)
   did you figure out a fix here? Have the exact same issue and can’t figure it 
   out…
 * Thanks,
 * Mark
 *  [realmoca](https://wordpress.org/support/users/realmoca/)
 * (@realmoca)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-17190085)
 * Hello Mark,
 * Yes I found the error, well at least in my case.
 * Simply I had some html code open that I didn’t close, for example:
 *     ```wp-block-code
       <div class="Columns" style="Font-size:16px; line-height:1.8;">
   
       Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
       ```
   
 * I forgot to close it wit </div>
 * I also found that if you have any extra open or close tag (<p> or <b> or </strong
   >, etc.) it’s going to give the same error.
 * Hope this works for you!
 * Best regards,
 * Realmoca
 *  [Muhammad Usama Ghouri](https://wordpress.org/support/users/ghouri80/)
 * (@ghouri80)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-17368536)
 * I had the same issue in tabs when I put shortcodes in it but in my case, now 
   it is resolved and I found the issue is due to the “return” used to output the
   user message in the render function. The issue was resolved when I used “echo”
   to print user messages instead of “return”.
   For Example when using “return” to
   print user messages `public function renderFunction($atts) {        ob_start();
   $current_user = wp_get_current_user();        $user_roles = $current_user->roles;
   if (!in_array('student', $user_roles)) {            return 'You do not have the
   student role.';        } else {            $courses = get_user_meta($current_user-
   >ID, '_course', true);            if (empty($courses)) {                return'
   No courses found for this student.';            } else {                if ($
   _SERVER['REQUEST_METHOD'] === 'POST') {                    $this->handleFormSubmission(
   $current_user, $courses);                }                $this->displayCourseHistoryTable(
   $current_user->ID);            }        }        return ob_get_clean();    }in
   this, I used return to print messages but when I used echo instead of return 
   the issue was resolved.I hope you found this helpful.
    -  This reply was modified 2 years, 2 months ago by [Muhammad Usama Ghouri](https://wordpress.org/support/users/ghouri80/).
    -  This reply was modified 2 years, 2 months ago by [Muhammad Usama Ghouri](https://wordpress.org/support/users/ghouri80/).

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

The topic ‘Shortcode not working in Tabs’ is closed to new replies.

 * ![](https://ps.w.org/elementskit-lite/assets/icon-256x256.gif?rev=2518175)
 * [ElementsKit Elementor Addons - Advanced Widgets & Templates Addons for Elementor](https://wordpress.org/plugins/elementskit-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementskit-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementskit-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/elementskit-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementskit-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementskit-lite/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 6 replies
 * 5 participants
 * Last reply from: [Muhammad Usama Ghouri](https://wordpress.org/support/users/ghouri80/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-in-tabs/#post-17368536)
 * Status: resolved