Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #214537


    I’m setting up a Choice based site and have a page with 3 side-tabbed forms (contact 7) and it all works great. I would like to set the default tab depending on the url query. So if http…/?t=1 will set it to tab 1, t=2 will set tab 2, etc.. Is it possible and do I need to do it with javascript or do I need to do a php function intercept?

    Thanks for any help.


    Hey canondude64!

    As far as I know it isn’t possible with anything built into the theme. So you would need to look into either a customization of the tabs to allow for it or as you mentioned some custom javascript to detect and change based on the url.

    Best regards,


    Thanks Devin.

    Still learning PHP/Wordpress coming from 20 years in Microsoft land. I found the code that creates the tab and put it in my child theme. If anyone else wants to do something similar, this is what I added

    		if(is_numeric($_GET["tab"])) { $initial_open = $_GET["tab"];} // jkm - open querystring "tab" if set
    		else if(!is_numeric($initial_open)) $initial_open = 1;


    if(!is_numeric($initial_open)) $initial_open = 1;

    in the function avia_sc_sidebar_tabs

    Might not be best practices, but it works! :D



    Nice. Glad you found a fix. :)

    Best regards,

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Set SideBar Tab from url query string?’ is closed to new replies.