• Resolved Elton Heta

    (@eltonheta)


    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 to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Md Abdullah Al Arif

    (@faithcoder)

    Hi @eltonheta,

    Thanks for contacting us.

    I’ve checked the Tab widget with Shortcode, it seems fine on my end (screencast). 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

    (@eltonheta)

    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.

    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

    @eltonheta or @realmoca did you figure out a fix here? Have the exact same issue and can’t figure it out…

    Thanks,

    Mark

    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:

    <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

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Shortcode not working in Tabs’ is closed to new replies.