Additional Tabs in Single Listing Display
Hi all,
I've seen a few posts on the forums asking how to add additional tabs to the single listing page, so I thought I'd share how I've achieved it, and why I took the approach I did.
This isn't an in-depth tutorial, just an outline of the steps I took, to get what I wanted.
My first approach was to try to extend the existing tabs structure that is part of the Vantage theme...I amended single-listing.php to add my new tabs, and then figured out that I'd have to also amend /includes/scripts.
js as this handles the hover states and visibility for the active/inactive tabs.
I'm not a fan of modifying core files, so I wrote a little piece of code in my child theme's functions.php to deregister scripts.
js and register my child-theme's /includes/scripts.
js - that got me a child theme version of scripts.
js. I was able to mod this to make my tabs behave perfectly....BUT....scripts.
js also contains code that handles the contact listing owner button and other stuff...and for some reason using a child theme version of scripts.
js made this break...I think because of priorities...whatever the reason, I couldn't be bothered to work it out, so went for a new approach!
I ditched my above attempts, popped over to Code Canyon and paid the very reasonable sum of $4 for a pure css solution to multiple tabs...it had stacks of examples, stacks of features, and the only file I needed to change was single-listing.php. I now have 5 tabs on my single listing page, and the best part of it all, is that the code snippet from codecanyon is totally responsive, so it works perfectly on mobiles too!
So I definitely recommend the css-only way to get multiple tabs on your single listing page. No core file changes, no jquery to worry about...simples!
If anyone wants more details or to find out which codecanyon script I used, just DM me...
red20