Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8174281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:24:41+00:00 2026-06-06T22:24:41+00:00

I have a wordpress theme that has a build in shortcode for creating an

  • 0

I have a wordpress theme that has a build in shortcode for creating an tabbed interface. The problem is that I can’t link from an external page to a specific tab. I saw that there are multiple questions about the same issue, but no answer worked for me. I have to mention that my javascript / jQuery skills are close to zero so even if this might seem simple, I have no idea what to do.

I found the jQuery code responsible for the accordion tabs in a file in my theme, here it is:

// ---------------------------------------
// TAB
// ---------------------------------------
function base_tab() {
$('.tabs-wrap').each(function(){
    var tab_group = $('.tabs-wrap');
    $('.tabs li', tab_group).click(function(e){
        e.preventDefault();
        $('.tabs a', tab_group).removeClass('current');
        $('a', this).addClass('current');

        $('.panes .pane', tab_group).hide();
        $('.panes .pane', tab_group).eq($(this).index()).show();
    });

    // Trigger Initial Tab
    var initial_tab = parseInt( $('.tabs', this).attr('initial-tab') );
    $('.tabs li', tab_group).eq(initial_tab).trigger('click');
});
}

As far as I understood from previous, similar questions I need to add this code but I can’t figure out on my own where and how to make it work:

$(window.location.hash).click();

All the links to the tabs are currently like this: http://www.websitename.com/page/#

I’ll appreciate any help, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:24:42+00:00Added an answer on June 6, 2026 at 10:24 pm

    First change your html into this

    <ul class="tabs" initial-tab="0">
       <li><a href="#all">All</a></li>
       <li><a href="#kids">Kids Place &#8211; Kidproof</a></li>
       <li><a href="#baby">Baby Rattle Toy</a></li>
       <li><a href="#kidsvideo">Kids Place Video Player</a></li>
       <li><a href="#letter">Letters With Ally</a></li>
       <li><a href="#mommy">Mommy bird and her chick</a></li>
    </ul>
    

    Then write some extra code

    $(function(){
       var hash = window.location.hash;
       var anchor = $('a[href$="'+hash+'"]');
       if (anchor.length > 0){
          anchor.click();
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wordpress theme that I like to duplicate. To make things easier
I have a Wordpress theme that uses MooTools and jQuery. I use jQuery noConflict
this is function.php of a wordpress theme that NOD32 says this code have a
I have a Wordpress Front End Form to Publish/Draft Posts directly from my theme:
I am styling a Wordpress theme but has run into problem with IE7. The
I am writing a wordpress theme, and have run into a fairly basic problem.
I have a website that has a combination of Wordpress static pages and posts,
I've got a pretty popular WordPress theme that has a template switcher (basically just
I have a wordpress theme in which i have to create a page that
I have a self-hosted WordPress blog post that got popular and has over 100

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.