Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Browser History API and Tabs Shortcode WordPress



I need help with a website I built using a custom WordPress child theme which uses the Enfold theme as its parent theme.

I need to enable the back button to work with the built in Tabs shortcode.

An example page on the site with tabs is located here:

Here is a sample of the default tabs shortcode in action on the default parent theme:

As you can see the tabs already dynamically add a # and the tab title to the end of the url. However, it does not get added to the browser history so when a user clicks on the back button (after clicking around on a few tabs) it takes them back to the previously loaded page, not the last tab they were looking at.

I've looked at a few sources for getting this to work the way we want, such as:

I think one of those may work. I just need help implementing the correct solution.

Here is the default theme Tab Shortcode js:

Here is the Tab Shortcode php file: (the part that outputs the tabs is near line 191)

I realize this question/request may need more information or source code. If so, please just let me know what you need and I will try to get it to you.

I am hoping to have this done in the most minimal and efficient methods possible, without rewriting a lot of the existing code.

Please let me know if you think you could figure this out or if you have any other questions.


Answers (4)


Ryan S answers:

Have you tried using this

There's a code to follow at and a sample.

Hope that helps


Balanean Corneliu answers:

Hello Derek,
why you dont use this plugin
seems to have the functionality you need.


Just Me answers:

Can you describe the scenario with a little more detail? What do you click and where do you want to go? The links I tried all open in a new window/tab which means, when I close the windows/tab I am back where I started from already. But maybe you have something else in mind.


Bob answers:

I think I can solve it. But I need little more time. It will be good if you can provide me theme.