<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Maverick Web Creations &#187; wordpress mootabs mootools javascript web design css tabs</title>
	<atom:link href="http://www.maverickwebcreations.com/tag/wordpress-mootabs-mootools-javascript-web-design-css-tabs/feed" rel="self" type="application/rss+xml" />
	<link>http://www.maverickwebcreations.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 05:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Add MooTabs to Your WordPress Theme</title>
		<link>http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html</link>
		<comments>http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html#comments</comments>
		<pubDate>Mon, 20 Oct 2008 07:01:07 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[wordpress mootabs mootools javascript web design css tabs]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=269</guid>
		<description><![CDATA[<p>It seems like adding tabs to display a variety of WordPress lists in the sidebar is getting very popular. It saves space and allows us to display a lot of content, not to mention, it looks kind of neat too.</p>
<p>Installing MooTabs is the easiest part. Styling it is the &#8230; <a href="http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p>It seems like adding tabs to display a variety of WordPress lists in the sidebar is getting very popular. It saves space and allows us to display a lot of content, not to mention, it looks kind of neat too.</p>
<p>Installing MooTabs is the easiest part. Styling it is the hardest part. The default template looks very ugly. Although I won&#8217;t go into great detail on how to style it, I will point out certain installation tips for WordPress sites that will improve the performance of your WordPress sites.</p>
<p><strong>Step 1: Download MooTabs</strong></p>
<p>Go to MooTabs&#8217; web site to <a href="http://www.silverscripting.com/mootabs/">download the latest version of MooTabs</a>. At the time of this writing the latest version is 1.2. You will also need to download MooTools. The latest version of MooTools is 1.2.1 but it does not work with MooTabs 1.2! I could not find MooTools 1.11 on MooTools&#8217; web site.</p>
<p>I uploaded MooTools 1.11 to my web server. If you can&#8217;t find it anywhere on the internet, <a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/10/mootools.v1.11.js">download MooTools 1.11 from us instead</a>.</p>
<p><strong>Step 2: Upload MooTabs to Your WordPress Theme&#8217;s Folder</strong></p>
<p>I like to store my Javascript files in a folder called &#8220;js&#8221;. For my CSS files, I like to store them in a folder called &#8220;css&#8221;. Let&#8217;s assume my template folder is called &#8220;cooltemplate&#8221;, you should upload the MooTabs files in the following manner:</p>
<p>1. /wp-content/themes/cooltemplate/css &#8211; Upload mootabs1.2.css here.<br />
2. /wp-content/themes/cooltemplate/js &#8211; Upload mootabs1.2.js and mootools.v1.11.js here.</p>
<p><strong>Step 3: Add MooTabs References to Your WordPress Theme&#8217;s header.php</strong></p>
<p>Add the following code to your theme&#8217;s header.php file in between the head tags.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; href=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/css/mootabs1.2.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/js/mootools.v1.11.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/js/mootabs1.2.js&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.addEvent('domready', init);
function init()
{
	myTabs_object = new mootabs('myTabs', {height: 'auto', width: 'XXXpx', changeTransition: 'none', mouseOverClass: 'over'});
}
&lt;/script&gt;
</pre>
<p>If you only display MooTabs on the blog pages, do this to prevent the loading of the MooTabs files on non-blog pages.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
if(!is_page())
{
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; href=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/css/mootabs1.2.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/js/mootools.v1.11.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo bloginfo('template_directory'); ?&gt;/js/mootabs1.2.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.addEvent('domready', init);
function init()
{
	myTabs_object = new mootabs('myTabs', {height: 'auto', width: 'XXXpx', changeTransition: 'none', mouseOverClass: 'over'});
}
&lt;/script&gt;
}
?&gt;
</pre>
<p>It does not matter what you write for the code &#8220;MyTabs_object&#8221;. However, the code &#8220;myTabs&#8221; must match the HTML code you use in the sidebar. Feel free to change &#8220;XXXpx&#8221; to your desired width. e.g. 250px.</p>
<p>An alternative way to initialize the MooTabs would be to save the following code into a Javascript (.js) file.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
window.addEvent('domready', init);
function init()
{
	myTabs_object = new mootabs('myTabs', {height: 'auto', width: 'XXXpx', changeTransition: 'none', mouseOverClass: 'over'});
}
&lt;/script&gt;
</pre>
<p><strong>Step 4: Add MooTabs Code into Your WordPress Theme&#8217;s sidebar.php</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;myTabs&quot;&gt;
	&lt;ul&gt;
		&lt;li title=&quot;Tab1&quot;&gt;Tab 1 Label&lt;/li&gt;
		&lt;li title=&quot;Tab2&quot;&gt;Tab 2 Label&lt;/li&gt;
		&lt;li title=&quot;Tab3&quot;&gt;Tab 3 Label&lt;/li&gt;
	&lt;/ul&gt;
	&lt;div id=&quot;Tab1&quot;&gt;
	&lt;/div&gt;
	&lt;div id=&quot;Tab2&quot;&gt;
	&lt;/div&gt;
	&lt;div id=&quot;Tab3&quot;&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>This is the default code of the MooTabs. You may update &#8220;Tab 1 Label&#8221; to anything you want. The code &#8220;Tab1&#8243; in the &#8220;li title&#8221; must match with the &#8220;div id&#8221; code below it or it won&#8217;t work. In the previous step, I have configured my MooTabs to have &#8220;auto&#8221; height so that the content I insert in the tabs will automatically stretch the height of the MooTabs.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;post_tabs&quot;&gt;
	&lt;!-- MOO TAB TITLES - START --&gt;
	&lt;ul class=&quot;post_tabs_title&quot;&gt;
		&lt;li title=&quot;Latest&quot;&gt;Latest&lt;/li&gt;
		&lt;li title=&quot;Popular&quot;&gt;Popular&lt;/li&gt;
		&lt;li title=&quot;Comments&quot;&gt;Most Comments&lt;/li&gt;
	&lt;/ul&gt;
	&lt;!-- MOO TAB TITLES - END --&gt;
	&lt;!-- LATEST POSTS - START --&gt;
	&lt;div id=&quot;Latest&quot; class=&quot;mootabs_panel&quot;&gt;
		&lt;?php if(function_exists('recent_posts')) { recent_posts(); } ?&gt;
	&lt;/div&gt;
	&lt;!-- LATEST POSTS - END --&gt;
	&lt;!-- POPULAR POSTS - START --&gt;
	&lt;div id=&quot;Popular&quot; class=&quot;mootabs_panel&quot;&gt;
		&lt;?php if(function_exists('popular_posts')) { popular_posts(); } ?&gt;
	&lt;/div&gt;
	&lt;!-- POPULAR POSTS - END --&gt;
	&lt;!-- MOST COMMENTED POSTS - START --&gt;
	&lt;div id=&quot;Comments&quot; class=&quot;mootabs_panel&quot;&gt;
		&lt;ul&gt;&lt;?php if(function_exists('mdv_most_commented')) { mdv_most_commented(10); } ?&gt;&lt;/ul&gt;
	&lt;/div&gt;
	&lt;!-- MOST COMMENTED POSTS - END --&gt;
&lt;/div&gt;
</pre>
<p>The MooTabs is a great place to insert all the comments and post lists. I personally use it to display the <a href="http://rmarsh.com/plugins/recent-posts/">recent posts</a>, <a href="http://rmarsh.com/plugins/popular-posts-plugin/">popular posts</a>, most commented posts, <a href="http://rmarsh.com/plugins/recent-comments/">recent comments</a> and top commenters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

