• A lot of my pages has 3 tabs. I would like them to open on a specific tab according to the link. Is that possible? I mean, various links (on other pages) leading to various tabs of this particular page

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s not really possible with the toolkit shortcode tabs unless you add some javascript and give the tabs and ID in your shortcode.. So you may want to look at a plugin but you can also add the id like this:
    [tabs id=1]

    Just to the “tabs” shortcode.

    then you have to add this in a footer text widget:

    <script type="text/javascript">
    jQuery(document).ready(function ($) {
    var url = document.location.toString();
    if (url.match('#')) {$('.nav-tabs a[href=#'+url.split('#')[1]+']').tab('show') ;} 
    
      $('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
        window.location.hash = e.target.hash;
    $('.nav-tabs a[href='+e.target.hash+']').tab('show');
      });
    });
    </script>

    And that should do it for you.

    Kadence Themes

    Thread Starter kk_admin

    (@kk_admin)

    Somehow I did not manage to do that even with this code (probably I messed up something) ?? good old bookmarks work as well for the content I would put in tab, but thank you anyway!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to link directly a certain tab?’ is closed to new replies.