<div id="tab-side-container">
<ul>
<li><a href="#side-tab1">Tab 1</a></li>
<li><a href="#side-tab2">The Second Tab</a></li>
<li><a href="#side-tab3">Tab C</a></li>
</ul>
<div class="panel-container">
<div id="side-tab1">
<h2>Configurations</h2>
<p>This example has the animation disabled, so tab-switching is instantaneous. It also sets the active class names to custom names for more control over CSS stylization.</p>
</div>
<div id="side-tab2">
<h2>Heading 2</h2>
<p>Stuff from the second tab.</p>
</div>
<div id="side-tab3">
<h2>Heading 3</h2>
<p>More stuff from the last tab.</p>
</div>
</div>
</div>
http://codex.wordpress.org/Shortcode_API
I’m trying to set a shortcode for tabs in WordPress without JavaScript, but PHP is not my strong point. I really need help with this.
Ok i’ve found helpful example. I decided to share with it.
Here is an another working solution using class-based approach. It’s a nice alternative to using global variables. See this link for an explanation on how it works.
Here is a nice example in this post related to wordpress shortcode API
http://wp.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/
Also described each and every point that helps you more then your expectation.
Why to reinvent the wheel? You are using WordPress, use plugins as well (there are plenty for tabs):
1) http://wordpress.org/plugins/tabs-shortcode/
2) http://wordpress.org/plugins/wp-ui/faq/
3) http://wordpress.org/plugins/put/screenshots/