<?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>Aquoid Themes &#187; Recipes</title>
	<atom:link href="http://aquoid.com/news/category/recipes/feed/" rel="self" type="application/rss+xml" />
	<link>http://aquoid.com/news</link>
	<description>The Home of Suffusion</description>
	<lastBuildDate>Tue, 24 Jan 2012 05:25:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How To… Build a &#8220;Recent Posts&#8221; Widget With Thumbnails in Suffusion</title>
		<link>http://aquoid.com/news/2011/08/how-to%e2%80%a6-build-a-recent-posts-widget-with-thumbnails-in-suffusion/</link>
		<comments>http://aquoid.com/news/2011/08/how-to%e2%80%a6-build-a-recent-posts-widget-with-thumbnails-in-suffusion/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 16:57:29 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://aquoid.com/news/?p=1064</guid>
		<description><![CDATA[This is an easy one, thanks to the recently updated &#8220;Query Posts&#8221; widget. The &#8220;Query Posts&#8221; widget offers you a lot more in terms of what you can use it for, so be sure to play around with all the options there. Here is what you do: Do not include the standard &#8220;Recent Posts&#8221; widget <a href='http://aquoid.com/news/2011/08/how-to%e2%80%a6-build-a-recent-posts-widget-with-thumbnails-in-suffusion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This is an easy one, thanks to the recently updated <a href="http://aquoid.com/news/2011/07/suffusion-version-3-8-2/">&#8220;Query Posts&#8221; widget</a>. The &#8220;Query Posts&#8221; widget offers you a lot more in terms of what you can use it for, so be sure to play around with all the options there.</p>
<p>Here is what you do:</p>
<ol>
<li>Do not include the standard &#8220;Recent Posts&#8221; widget in your sidebar.</li>
<li>Add the &#8220;Query Posts&#8221; widget to the sidebar.</li>
<li>Set the number of posts you want to display.</li>
<li>Set the order to be &#8220;Descending&#8221;, and order by &#8220;Creation Date&#8221;.</li>
<li>Set the &#8220;Post Display Style&#8221; to be &#8220;Thumbnail and title&#8221; or &#8220;Thumbnail, title and excerpt&#8221;.</li>
<li>Pick the right size for the thumbnail and pick an excerpt length.</li>
<li>Set the categories to be shown as &#8220;Any Category&#8221;</li>
</ol>
<p>That&#8217;s it.</p>
<p>~Fin~</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2011/08/how-to%e2%80%a6-build-a-recent-posts-widget-with-thumbnails-in-suffusion/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To&#8230; Remove the White Space from the Left of a Post or Page</title>
		<link>http://aquoid.com/news/2011/07/how-to-remove-the-white-space-from-the-left-of-a-post-or-page/</link>
		<comments>http://aquoid.com/news/2011/07/how-to-remove-the-white-space-from-the-left-of-a-post-or-page/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 21:24:29 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://aquoid.com/news/2011/07/how-to-remove-the-white-space-from-the-left-of-a-post-or-page/</guid>
		<description><![CDATA[One question that gets frequently asked on the Suffusion Support Forum is: I am seeing this empty space to the left of my posts. I have tried everything, but I cannot get rid of it. This is really easy to solve and takes just about a minute. This “problem” occurs if both the following happen: <a href='http://aquoid.com/news/2011/07/how-to-remove-the-white-space-from-the-left-of-a-post-or-page/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>One question that gets frequently asked on the Suffusion Support Forum is:</p>
<blockquote><p>I am seeing this empty space to the left of my posts. I have tried everything, but I cannot get rid of it.</p>
</blockquote>
<p>This is really easy to solve and takes just about a minute. This “problem” occurs if both the following happen:</p>
<ol>
<li>You are using the Minima Skin. </li>
<li>You are not displaying any byline (meta) information. </li>
</ol>
<p>To fix it:</p>
<ol>
<li>Go to Other Graphical Elements → Post and Page Bylines → Posts (Default/Standard post format) → Position of meta information (including date). </li>
<li>Set it to display in the corners above/below the content. </li>
<li>If you want to set this for other post formats or pages, apply the same setting for them as well.</li>
</ol>
<p>~Fin~</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2011/07/how-to-remove-the-white-space-from-the-left-of-a-post-or-page/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How To&#8230; Hide the Search Box in Suffusion</title>
		<link>http://aquoid.com/news/2011/06/how-to-hide-the-search-box-in-suffusion/</link>
		<comments>http://aquoid.com/news/2011/06/how-to-hide-the-search-box-in-suffusion/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 15:45:50 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://aquoid.com/news/2011/06/how-to-hide-the-search-box-in-suffusion/</guid>
		<description><![CDATA[Gauging by trending questions on the Support Forum, I decided to start a series of simple “How To” solutions. Each addresses an oft answered yet frequently asked question on different support forums. Unlike the broader spectrum “Recipes”, this will require little to no coding. Here’s hoping that people will find the series useful. To hide <a href='http://aquoid.com/news/2011/06/how-to-hide-the-search-box-in-suffusion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Gauging by trending questions on the Support Forum, I decided to start a series of simple “How To” solutions. Each addresses an oft answered yet frequently asked question on different support forums. Unlike the broader spectrum “Recipes”, this will require little to no coding.</p>
<p>Here’s hoping that people will find the series useful.</p>
<p>To hide the search box in the navigation bar of Suffusion:</p>
<ol>
<li>Go to <em>Suffusion Options → Sidebar Configuration → Right Header Widgets</em> </li>
<li>For “Show Search in Widget Area on right side of header”, set it to “Hide the Search”</li>
</ol>
<p>~Fin~</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2011/06/how-to-hide-the-search-box-in-suffusion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using the New Sidebar Control Features from Version 3.7.7</title>
		<link>http://aquoid.com/news/2011/03/using-the-new-sidebar-control-features-from-version-3-7-7/</link>
		<comments>http://aquoid.com/news/2011/03/using-the-new-sidebar-control-features-from-version-3-7-7/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 21:29:56 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2011/03/using-the-new-sidebar-control-features-from-version-3-7-7/</guid>
		<description><![CDATA[The much maligned 3.7.7 release had some rather bright spots that got buried under the chaos of bugs. And judging by the support requests and false positives reported as bugs on the forum, I believe one of these features needs some elucidation. How Many Sidebars? One question I have had to fend with previous releases <a href='http://aquoid.com/news/2011/03/using-the-new-sidebar-control-features-from-version-3-7-7/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>The much maligned 3.7.7 release had some rather bright spots that got buried under the chaos of bugs. And judging by the support requests and false positives reported as bugs on the forum, I believe one of these features needs some elucidation.</p>
<h3>How Many Sidebars?</h3>
<p>One question I have had to fend with previous releases goes along these lines:</p>
<blockquote><p>I want to have 2 sidebars on my front page, which is a Blog page, and no sidebars for the individual posts themselves.</p>
</blockquote>
<p>The typical response to this used to be:</p>
<ol>
<li>Create a new static page. </li>
<li>Assign it a template like <em>Single Left, Single Right Sidebar</em> from the right side of your <em>Add Page</em> or <em>Edit Page</em> screen. </li>
<li>Go to <em>Settings → Reading</em>, and set the page you just created as the Home Page.</li>
</ol>
<p>The above approach has limitations. The key shortcoming is that this way you can only create a static home page – not a dynamic page of posts.</p>
<p>So I introduced a way to get around this.</p>
<p>If you go to <em>Sidebar Configuration → Sidebar Layout</em>, you will see a section titled <em>How Many Sidebars</em>. This is your entry point to configuring this. What this lets you do is assign one layout by default to individual posts and pages, and force a dynamic view to adopt another layout.</p>
<h3>Use Case: 2 Sidebars on the Blog Page, 1 on Category Views, 0 on Single Posts</h3>
<p>To set this up, define the following options:</p>
<ol>
<li><em>Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Default Views</em>:       <br />Set this to 0.</li>
<li><em>Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Blog Page</em>:       <br />Set this to <em>Double Left &#8211; Will inherit settings of the &quot;Double Left Sidebars&quot; template</em>, or whichever configuration you want to use.</li>
<li><em>Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Category Views</em>:       <br />Set this to <em>Single Left &#8211; Will inherit settings of the &quot;Single Left Sidebar&quot; template</em>, or whichever configuration you want to use.</li>
<li><em>Other Graphical Elements → Sizes and Margins</em>:      <br />Set your widths for the content appropriately in this section. This will be used by your posts by default.</li>
<li><em>Templates → Double Left Sidebars</em>:      <br />(Or whichever configuration you picked in #2 above)      <br />Set your widths and dimensions appropriately. These will be used by your Blog Page now.</li>
<li><em>Templates → Single Left Sidebar</em>:      <br />(Or whichever configuration you picked in #3 above)      <br />Set your widths and dimensions appropriately. These will be used by your Category Views now.</li>
</ol>
<p>That’s it. Your site will now show 0 sidebars for posts, but 2 for your Blog Page and 1 for your Categories.</p>
<h3>Misconceptions</h3>
<p>What I have seen happen on the Support Forum is that users tend to do this:</p>
<ol>
<li><em>Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Default Views</em>: Set to 2.</li>
<li><em>Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Blog Page</em>: Set to <em>Double Left &#8211; Will inherit settings of the &quot;Double Left Sidebars&quot; template</em>.</li>
</ol>
<p>At this point if you set the Sizes and Margins in <em>Other Graphical Elements → Sizes and Margins</em>, they will not affect your main page, <strong>because it has been configured to use the <em>Double Left Sidebars</em> template</strong> in the second step above. Instead, all you need to do is set the Blog Page to <em>Inherit default number of sidebars</em>. That way you will have consistency.</p>
<p>Another related misconception I have seen is more fundamental &#8211; users tend to explicitly assign a template to every view (such as categories, date archives etc) and then wonder what they should do for views that are not available (like something introduced by a plugin). This is a case of over-complicating the problem. If you have established a specific layout to your default view (like 1 sidebar, with the first sidebar positioned left), you must not assign the &#8220;Single Left Sidebar&#8221; to individual templates &#8211; that is pointless unless you want different column widths. Instead let everything inherit the default layout. Conversely if you want a single left sidebar layout for every link in your site, simply set the default view to have 1 sidebar with the first sidebar positioned left. Don&#8217;t worry about assigning templates to everything else because they will all use the default layout.</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2011/03/using-the-new-sidebar-control-features-from-version-3-7-7/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Short Codes in Suffusion</title>
		<link>http://aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/</link>
		<comments>http://aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 23:53:46 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Shortcodes]]></category>
		<category><![CDATA[Suffusion]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/</guid>
		<description><![CDATA[Suffusion comes armed with a good set of very useful short codes. In this post I wanted to highlight the short codes you get and I also wanted to provide an insight into how you can use short codes in general. What is a Short Code? A short code is a macro code introduced in <a href='http://aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Suffusion comes armed with a good set of very useful short codes. In this post I wanted to highlight the short codes you get and I also wanted to provide an insight into how you can use short codes in general.</p>
<h4>What is a Short Code?</h4>
<p>A short code is a macro code introduced in <a href="http://codex.wordpress.org/Shortcode_API">WordPress 2.5</a>. When inserted into regular content, the short code executes a piece of associated PHP code that prints out specific output. The most common example of short codes is the “gallery” short code provided by WordPress out of the box. </p>
<p> The following is the list of short codes provided within Suffusion:
<ol>
<li><strong>Short code:</strong> <code>[suffusion-categories]</code><br/> <em>Brief Description:</em> Used to print a list of categories.<br/> <em>Parameters and Usage</em>: This takes most if not all parameters of the WP call for <code>wp_list_categories()</code>.<br/> <em>Use Case:</em> If you want to display the list of categories from within a post. Since you can use most options of wp_list_categories, this is as powerful as running a query in the back-end. </li>
<li><strong>Short code:</strong> <code>[suffusion-the-year]</code><br/> <em>Brief Description:</em> Prints the current year.<br/> <em>Parameters and Usage</em>: This doesn&#8217;t take any parameters. Simply invoking <code>[suffusion-the-year]</code> prints the current year. This is generated by the short code: 2012.<br/> <em>Use Case:</em> If you want the current year to be shown in the copyright. </li>
<li><strong>Short code:</strong> <code>[suffusion-site-link]</code><br/>  <em>Brief Description:</em> Prints the link to your site.<br/> <em>Parameters and Usage</em>: This doesn&#8217;t take any parameters. Simply invoking <code>[suffusion-site-link]</code> prints the title of your site and links it to your site. This is generated by the short code: <a class="site-link" href="http://aquoid.com/news" title="Aquoid Themes" rel="home">Aquoid Themes</a>.<br/> <em>Use Case:</em> If you want to print the title of your site with a URL linking to it. </li>
<li><strong>Short code:</strong> <code>[suffusion-the-author]</code><br/> <em>Brief Description:</em> Used to print information about the author of a post.<br/> <em>Parameters and Usage</em>: This takes one parameter, <code>display</code>. Depending on the value of <code>display</code> certain information is printed about the author of a post. The <code>display</code> parameter could have any of the following values:
<ul>
<li>author &ndash; Displays the display name of the author of the post</li>
<li>modified-author &ndash; Displays the display name of the author who modified the post</li>
<li>description &ndash; Displays the biographical information set in the author&#8217;s profile</li>
<li>login &ndash; Displays the login name of the author of the post</li>
<li>first-name &ndash; Displays the first name of the author of the post</li>
<li>last-name &ndash; Displays the last name of the author of the post</li>
<li>nickname &ndash; Displays the nickname of the author of the post</li>
<li>id &ndash; Displays the id of the author of the post</li>
<li>url &ndash; Displays the URL of the author of the post. This is only the URL, hence it needs to be suitably combined with the name of the author for a meaningful display</li>
<li>email &ndash; Displays the email of the author of the post</li>
<li>link &ndash; Displays the name of the author of the post, linking to the author&#8217;s URL</li>
<li>aim &ndash; Displays the AIM details of the author of the post. For this to work the AIM account details should be set in the user profile section of the author.</li>
<li>yim &ndash; Displays the Yahoo details of the author of the post. For this to work the Yahoo account details should be set in the user profile section of the author.</li>
<li>posts &ndash; Displays the number of posts written by the author of the post.</li>
<li>posts-url &ndash; Displays the URL for all posts by the author. Since this is only a URL, it might need to be combined with some more meaningful text for a better display.</li>
<li>twitter &ndash; Displays the link to the Twitter URL of the author of the post. Requires you to set up Twitter as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>facebook &ndash; Displays the link to the Facebook URL of the author of the post. Requires you to set up Facebook as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>technorati &ndash; Displays the link to the Technorati URL of the author of the post. Requires you to set up Technorati as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>linkedin &ndash; Displays the link to the LinkedIn URL of the author of the post. Requires you to set up LinkedIn as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>flickr &ndash; Displays the link to the Flickr URL of the author of the post. Requires you to set up Flickr as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>delicious &ndash; Displays the link to the Del.icio.us URL of the author of the post. Requires you to set up Del.icio.us as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>digg &ndash; Displays the link to the Digg URL of the author of the post. Requires you to set up Digg as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>stumbleupon &ndash; Displays the link to the StumbleUpon URL of the author of the post. Requires you to set up StumbleUpon as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
<li>reddit &ndash; Displays the link to the Reddit URL of the author of the post. Requires you to set up Reddit as a user contact method from <em>Blog Features &rarr; User Profiles</em></li>
</ul>
<p> The following invocation of the short code:
<pre class="brush: xml; title: ; notranslate">[suffusion-the-author display='author'] has written &lt;a href='[suffusion-the-author display='posts-url']'&gt; [suffusion-the-author display='posts'] posts&lt;/a&gt;.
He can be followed on &lt;a href='[suffusion-the-author display='twitter']'&gt;Twitter&lt;/a&gt;.</pre>
<p>produces:</p>
<blockquote><div>Sayontan has written <a href="http://aquoid.com/news/author/sayontan/"> 166 posts</a>. He can be followed on <a href="">Twitter</a>.</div>
</blockquote>
<p><em>Use Case:</em> If you want to insert author-specific information at the bottom of a post, like the number of articles, a brief description etc.</li>
<li><strong>Short code:</strong> <code>[suffusion-the-post]</code><br/><em>Brief Description:</em> Used to print information about a post, like the id, title and permalink.<br/> <em>Parameters and Usage</em>: This takes one parameter, <code>display</code>. Depending on the value of <code>display</code> a certain piece of information is displayed. The following invocation:
<pre class="brush: xml; title: ; notranslate">This post has an id [suffusion-the-post display='id']. Its permalink is [suffusion-the-post display='permalink'] and the title is [suffusion-the-post display='title'].</pre>
<p>produces:</p>
<blockquote><div>This post has an id 808. Its permalink is http://aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/ and the title is WordPress Short Codes in Suffusion.</div>
</blockquote>
<p><em>Use Case:</em> If you want to insert post-specific information at the bottom of a post.</li>
<li><strong>Short code:</strong> <code>[suffusion-login-url]</code><br/><em>Brief Description:</em> Prints the login URL for the site.<br/><em>Parameters and Usage</em>: This takes no parameters.<br/><em>Use Case:</em> If you don&#8217;t want the Meta widget, but want to show a login URL</li>
<li><strong>Short code:</strong> <code>[suffusion-logout-url]</code><br/><em>Brief Description:</em> Prints the logout URL for the site.<br/><em>Parameters and Usage</em>: This takes no parameters.<br/><em>Use Case:</em> If you don&#8217;t want the Meta widget, but want to show a logout URL</li>
<li><strong>Short code:</strong> <code>[suffusion-loginout]</code><br/> <em>Brief Description:</em> Prints the URL to login if logged out or logout if logged in.<br/><em>Parameters and Usage</em>: This takes no parameters.<br/><em>Use Case:</em> If you don&#8217;t want the Meta widget, but want to show a URL to logout if a user is logged in and vice versa.</li>
<li><strong>Short code:</strong> <code>[suffusion-register]</code><br/><em>Brief Description:</em> Prints the URL to register as a member of the site.<br/><em>Parameters and Usage</em>: This takes no parameters.<br/><em>Use Case:</em> If you don&#8217;t want the Meta widget, but want to show a registration URL</li>
<li><strong>Short code:</strong> <code>[suffusion-adsense]</code><br/><em>Brief Description:</em> Prints AdSense code based on specified parameters.<br/><em>Parameters and Usage</em>: This takes four parameters: <code>client</code>, <code>slot</code>, <code>width</code> and <code>height</code>. It inserts the corresponding ad when invoked. I don&#8217;t have an AdSense account, so I cannot demonstrate this, though.<br/><em>Use Case:</em> If you want to insert an advertisement in the body of a post.</li>
<li><strong>Short code:</strong> <code>[suffusion-tag-cloud]</code><br/><em>Brief Description:</em> Prints a tag cloud.<br/><em>Parameters and Usage</em>: This takes three parameters: <code>smallest</code>, <code>largest</code> and <code>number</code>, respectively indicating the smallest font size (default 8), the largest font size (default 22) and the number of tags to display (default 45).<br/><em>Use Case:</em> If you are not satisfied with the default &#8220;Tag Cloud&#8221; widget and would like more control over how many tags to display and in what sizes. You could use this in a text widget too, to simulate the tag-cloud widget.</li>
<li><strong>Short code:</strong> <code>[suffusion-widgets]</code><br/><em>Brief Description:</em> Prints an ad hoc widget area, based on specified parameters.<br/><em>Parameters and Usage</em>: To use this short code you first have to go to <em>Appearance &rarr; Widgets</em>, then fill in the widgets you want in the widget areas titled Ad Hoc Widgets 1, Ad Hoc Widgets 2, &#8230; Ad Hoc Widgets 5. You don&#8217;t need to put widgets in all of them &ndash; just put them in the ones you want to use. The short code takes 3 parameters &#8211; <code>id</code>, <code>container</code> and <code>container-class</code>. You could invoke the short code thus:
<pre class="brush: xml; title: ; notranslate">[suffusion-widgets id='2' container-class='custom-class']</pre>
<p>This prints the widget area for Ad Hoc Widgets 2 and assigns the widget area a class called &#8216;custom-class&#8217;. If you pass the <code>container</code> parameter with a value <code>'false'</code> then the widgets are not put in any container (and the <code>container-class</code> parameter is ignored).<br />
<em>Use Case:</em> If you want to display some widgets from within a post.</li>
<li><strong>Short code:</strong> <code>[suffusion-multic]</code> and <code>[suffusion-column]</code> <br/><em>Brief Description:</em> This was introduced in version 3.6.0 to support multi-column layouts. These short codes are dependent on each other.<br/><em>Parameters and Usage</em>: The <code>[[suffusion-multic]</code> short code takes no parameters and is used as a container indicating that you have a multi-column layout within. The <code>[suffusion-column]</code> short code takes the parameter <code>width</code>, which could have values 1, 1/2, 1/3, 1/4, 2/3, 3/4, 100, 050, 033, 025, 066 and 075, indicating what fraction of the width is to be taken up by a column. The default is 1. This is how you can use the short code:
<pre class="brush: xml; title: ; notranslate">[[suffusion-multic]
  [suffusion-column width='1/2']A column with 1/2 the total width [/suffusion-column]
  [suffusion-column width='1/4']A column with 1/4 the total width[/suffusion-column]
  [suffusion-column width='1/4']Another column with 1/4 the total width[/suffusion-column]
[/suffusion-multic]</pre>
<p style='margin-bottom: 0'>This is how the above looks: </p>
<p><div class='suf-multic'> <div class='suf-mc-col suf-mc-col-050 '>A column with 1/2 the total width</div> <div class='suf-mc-col suf-mc-col-025 '>A column with 1/4 the total width</div> <div class='suf-mc-col suf-mc-col-025 '>Another column with 1/4 the total width</div> </div><br />
Mind you, WP has a nasty habit of inserting <code>&lt;p&gt;</code> tags at line breaks, so you might have to be careful about stripping out new lines from the above code before using it.</li>
</ol>
<p>This list will be expanded as more short codes are added to Suffusion. <strong>As usual, please don&#8217;t post support queries here. Use the Support forum instead.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/09/wordpress-short-codes-in-suffusion/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Suffusion Child Themes: Tips and Tricks</title>
		<link>http://aquoid.com/news/2010/09/suffusion-child-themes-tips-and-tricks/</link>
		<comments>http://aquoid.com/news/2010/09/suffusion-child-themes-tips-and-tricks/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 17:48:25 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/09/suffusion-child-themes-tips-and-tricks/</guid>
		<description><![CDATA[With effect from version 3.7.5 of Suffusion any reference to Blog Features below should be read as Back-end Settings. Thanks to Suffusion’s fairly complex back-end coding there are a few tips and tricks that will help you as a user use child themes effectively. When Should I Use Child Themes? The simplest use case I <a href='http://aquoid.com/news/2010/09/suffusion-child-themes-tips-and-tricks/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p class='note'>With effect from version 3.7.5 of Suffusion any reference to <em>Blog Features</em> below should be read as <em>Back-end Settings</em>.</p>
<p>Thanks to Suffusion’s fairly complex back-end coding there are a few tips and tricks that will help you as a user use child themes effectively.</p>
<h4>When Should I Use Child Themes?</h4>
<p>The simplest use case I can think of for using child themes is if you have BuddyPress on a WP-MS (WordPress Multi-Site) configuration, because you will want to use the Suffusion BuddyPress Pack and you would want to prevent its files from getting overwritten every time you upgrade the theme.</p>
<p>Apart from that if you have significant changes that you want to&#160; make to the layout, which cannot be accommodated through CSS alone, using a child theme is a very clean and elegant way to do it.</p>
<h4>What Should I Know While Using Child Themes in Suffusion?</h4>
<p>In this post I will highlight two tips and tricks regarding child themes in Suffusion.</p>
<ol>
<li><strong>Import CSS </strong>      <br />As per WordPress guidelines this is the generic header of a child theme’s style.css should look like this:             </p>
<pre class="brush: css; title: ; notranslate">/*
Theme Name: Son of Suffusion
Theme URI: http://your-theme-url
Description: Child Theme based on Suffusion
Version: 1.0.0
Author: Your Name
Author URI: http://your-url
Template: suffusion
*/

@import url(&quot;../suffusion/style.css&quot;);</pre>
<p>But here is a catch. You are typically going to select a skin for Suffusion. If so, you will have multiple stylesheets included in your page, depending on your skin: </p>
<ol>
<li>For light themes (if the theme is Gray Shade 1 on a light background): <em>style.css → skins/light-theme-gray-1/skin.css</em> </li>
<li>For dark themes (if the theme is Gray Shade 1 on a dark background): <em>style.css → skins/light-theme-gray-1/skin.css → dark-style.css → skins/dark-theme-gray-1/skin.css</em> </li>
<li>For Minima (and future skins): <em>style.css → skins/minima/skin.css</em> </li>
</ol>
<p>Note that this entire stylesheet hierarchy is loaded <em><u>before</u></em> your child theme is loaded, because of the complexity of the design. So by including your import statement you are actually re-inserting the base style.css file after all the other stylesheets. That will naturally cause display issues. </p>
<p>As it turns out, the fix is easy. You have many options, actually: </p>
<ol>
<li>Go to <em>Blog Features → Child Themes</em> and set it to <strong>not inherit</strong> any stylesheets. You can then pick and choose your stylesheet declarations in this manner:
<pre class="brush: css; title: ; notranslate">/*
Theme Name: Son of Suffusion
Theme URI: http://your-theme-url
Description: Child Theme based on Suffusion
Version: 1.0.0
Author: Your Name
Author URI: http://your-url
Template: suffusion
*/

@import url(&quot;../suffusion/style.css&quot;);
@import url(&quot;../suffusion/skins/minima/skin.css&quot;);
</pre>
<p>This way you are telling the theme to ignore the skin selection and you are handpicking the skins you want. Note that this method requires some familiarity with the theme’s internals. </li>
<li>The second option works if you are using Suffusion’s internal optimization features from <em>Blog Features → Site Optimization → Use Compression for CSS</em>. You can choose to use either of the methods with GZIP compression. In addition, set the <em>Blog Features → Child Themes</em> to <strong>inherit</strong> the stylesheets. This method ignores any import statements that you might have in your child theme’s style.css </li>
<li>The third method is even simpler. You can leave your <em>Blog Features → Child Themes</em> to <strong>inherit</strong> the stylesheets. But simply don’t put any @import statements in your style.css. That’s all. This is best suited if you are using the child theme as a replacement for the <a href="http://www.aquoid.com/news/2010/02/there-are-some-things-suffusion-cant-do-for-everything-else-there-is-the-custom-styles-option/">Custom Styles option</a>.
<p></li>
</ol>
</li>
<li><strong>BuddyPress tag</strong>
<p>This is a very simple trick for using Suffusion with the <a href="http://www.aquoid.com/news/plugins/suffusion-buddypress-pack/">Suffusion BuddyPress Pack</a>. I have explained this trick on the BP Pack page too. If you are running WordPress in a multi-site mode and you want to use Suffusion, here is what you will see if you activate Suffusion as your default theme: </p>
<blockquote>
<div>You&#8217;ll need to <a href="http://aquoid.org/wp-admin/themes.php">activate a BuddyPress compatible theme</a> to take advantage of all of the features. We&#8217;ve bundled a default theme, but you can always <a href="http://aquoid.org/wp-admin/theme-install.php?type=tag&amp;s=buddypress&amp;tab=search">install some other compatible themes</a> or <a href="http://aquoid.org/wp-admin/plugin-install.php?type=term&amp;tab=search&amp;s=bp-template-pack">upgrade your existing WordPress theme</a>.</div>
</blockquote>
<p>Here is what you do to fix this message: </p>
<ol>
<li>Create a child theme with the following header:
<pre class="brush: css; title: ; notranslate">
/*
Theme Name: Son of Suffusion
Theme URI: http://your-theme-url
Description: Child Theme based on Suffusion
Version: 1.0.0
Author: Your Name
Author URI: http://your-url
Template: suffusion
Tags: buddypress
*/
</pre>
<p>The last line is very important. It tells WP that your theme is BuddyPress-compatible. </li>
<li>Download the files for the <a href="http://www.aquoid.com/news/plugins/suffusion-buddypress-pack/">Suffusion BuddyPress Pack</a> and put them in your child theme’s folder. </li>
<li>Activate the child theme. The message goes away!! </li>
</ol>
<p>I could have added the &quot;buddypress&quot; tag to Suffusion by myself, but that really really slows down the approval of the theme. In fact I had added the tag in a prior version, but disappointed with the delay in it getting approved I separated BP support from the core theme.</p>
<p></li>
<li><strong>Sidebar Management</strong>
<p>This is a very cool trick if you want to create your own templates with different sidebars etc. I introduced this feature in version 3.6.6 after <a href="http://www.aquoid.com/forum/viewtopic.php?f=4&amp;t=2601&amp;p=11663">an interesting discussion on the support forum</a>. <strong>Note: You don’t need to do all of this if you are adding a regular template that has the same number of sidebars as the rest of your site.</strong> </p>
<p>The core of the requirement is that you might want to create your own templates that have specific arrangements of sidebars and other widget areas. For example you might create a template for a custom post type that uses 1 sidebar while the rest of your site uses 2 sidebars. How would you tell Suffusion that this template has 1 sidebar? Given that all components of Suffusion are fixed-width, you cannot simply avoid calling a sidebar function – that will result in an empty space. </p>
<p>So how is this to be done? The answer: using filter hooks. I introduced two filter hooks in 3.6.6 – <code>suffusion_filter_template_prefixes</code> and <code>suffusion_filter_template_sidebars</code>. In the functions.php file of your child theme, put in this code: </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
add_filter('suffusion_filter_template_prefixes', 'my_custom_template_prefixes');
function my_custom_template_prefixes($template_prefixes) {
    if (is_array($template_prefixes)) {
        $template_prefixes['my-custom-template-1.php'] = false;
        $template_prefixes['my-custom-template-2.php'] = false;
        // In the above replace my-custom-template-1.php etc with the name of your template file.
        // For every custom template that has specific sidebar requirements create a line such as the above.
    }
    return $template_prefixes;
}
add_filter('suffusion_filter_template_sidebars', 'my_custom_template_sidebars');
function my_custom_template_sidebars($template_sidebars) {
    if (is_array($template_sidebars)) {
        $template_sidebars['my-custom-template-1.php'] = 1;
        $template_sidebars['my-custom-template-2.php'] = 1;
        // In the above replace my-custom-template-1.php etc with the name of your template file and &quot;1&quot; with the number of sidebars you need.
        // For every custom template that has specific sidebar requirements create a line such as the above.
    }
    return $template_sidebars;
}
?&gt;
</pre>
<p>Be careful about not putting any empty spaces or new lines before and after the php tags! Otherwise you will get the notorious white screen of death. </p>
<p>Once you have this code in place, you can have your custom templates in your theme with their unique sidebar arrangements, and not worry about Suffusion updates overwriting them.</li>
</ol>
<p>Note that the last feature is not currently available, but it should soon be, based on when the next version is approved. </p>
<p>As I find more use cases of this sort I will post them for your consideration.</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/09/suffusion-child-themes-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Suffusion Version 3.5.2 and Child Themes</title>
		<link>http://aquoid.com/news/2010/06/suffusion-version-3-5-2-and-child-themes/</link>
		<comments>http://aquoid.com/news/2010/06/suffusion-version-3-5-2-and-child-themes/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 02:04:04 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>
		<category><![CDATA[Theme Releases]]></category>
		<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[Child Themes]]></category>
		<category><![CDATA[Suffusion]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/06/suffusion-version-3-5-2-and-child-themes/</guid>
		<description><![CDATA[Minutes after making my submission of version 3.5.1 I realized that there were some errors that had inadvertently crept in because I used the body_class() method. So I had to fix the errors and resubmit the theme, but as version 3.5.2. Now, I had already laid out plans for 3.5.3 before making these changes, so <a href='http://aquoid.com/news/2010/06/suffusion-version-3-5-2-and-child-themes/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Minutes after making my submission of version 3.5.1 I realized that there were some errors that had inadvertently crept in because I used the <code>body_class()</code> method. So I had to fix the errors and resubmit the theme, but as version 3.5.2. Now, I had already laid out plans for 3.5.3 before making these changes, so another feature found its way in. So here are the changes for 3.5.2:</p>
<ol>
<li><strong><u>Support for Child Themes </u></strong>      <br />This was another of those long-time to-do activities that I finally got around to delivering. This was surprisingly easy to incorporate and I just had to make a handful of changes. You can now define <a href="http://codex.wordpress.org/Child_Themes">child themes</a> for Suffusion. This is very easy for you as well. Let us assume that you will create a child theme called “Son of Suffusion”. Here is what you will do:
<ol>
<li>Create a folder called <em>son-of-suffusion</em> under <em>wp-content/themes</em>. </li>
<li>Create a file called <em>style.css</em> in this folder. Put in these lines:           <br /> 
<pre class="brush: css; title: ; notranslate">/*
Theme Name: Son of Suffusion
Theme URI: http://your-theme-url
Description: Child Theme based on Suffusion
Version: 1.0.0
Author: Your Name
Author URI: http://your-url
Template: suffusion
*/

@import url(&quot;../suffusion/style.css&quot;);
</pre>
</li>
<li>The last line in comments, “<code>Template: suffusion</code>” is critical. It tells WP that your theme is based on Suffusion. Make sure that what you put in there is the directory where Suffusion resides. </li>
<li>The first line after the comments is important if you want to use the Suffusion stylesheet. If you don’t have it, <strong><em>Suffusion’s styles will not be loaded</em></strong>. </li>
<li>That’s all, really. You can add additional styles if you wish. This would be one way to not use the “Custom Styles” option. You can also add a <em>functions.php</em> and define your own PHP functions there. That would be one way to avoid using the “Custom PHP” functionality. Note the following:
<ol>
<li>What you define in functions.php adds on to the existing functions in Suffusion’s functions.php file. </li>
<li>Any other template file that you add overrides Suffusion’s templates. So if you create your own <em>author.php</em> file, that will take precedence over Suffusion’s author template. One very important use of child themes is if you want custom templates for custom purposes. E.g. You can create a file called <em>category-16.php</em> and define a special layout for your category with id 16. You can also create author-specific templates for WP 3.0. See <a href="http://codex.wordpress.org/Template_Hierarchy">WP’s template hierarchy</a> for more details regarding how to add custom templates. </li>
</ol>
</li>
<li>Suffusion’s huge array of options will all be available to you using this method. Ensure that you keep the theme up-to-date. </li>
</ol>
</li>
<li>Bug fixes for some errors introduced by the <code>body_class()</code> function, for static pages. Of course, after submitting 3.5.2 I caught another of these errors for author pages, but I am not going to bother with another release before WP approves my current release. </li>
</ol>
<p>That’s it for now. I guess 3.5.2 will be a significant release for you users because it will come armed with both BuddyPress support and Child Theme support. So just keep waiting for WP to approve, while I figure out how to make some more WP 3.0 functionality available to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/06/suffusion-version-3-5-2-and-child-themes/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Building a Dynamic Tabbed Sidebar Using JQuery</title>
		<link>http://aquoid.com/news/2010/05/building-a-dynamic-tabbed-sidebar-using-jquery/</link>
		<comments>http://aquoid.com/news/2010/05/building-a-dynamic-tabbed-sidebar-using-jquery/#comments</comments>
		<pubDate>Thu, 27 May 2010 20:26:32 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/05/building-a-dynamic-tabbed-sidebar-using-jquery/</guid>
		<description><![CDATA[In the release notes for version 3.5.0 of Suffusion I mentioned that native tabbed sidebar support was added. Since I am quite proud of the technique I used to get this effect, I decided to write a tutorial on how to do it. But first I would like to pay homage to the following that <a href='http://aquoid.com/news/2010/05/building-a-dynamic-tabbed-sidebar-using-jquery/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.aquoid.com/news/2010/05/suffusion-version-3-5-0/">release notes for version 3.5.0 of Suffusion</a> I mentioned that native tabbed sidebar support was added. Since I am quite proud of the technique I used to get this effect, I decided to write a tutorial on how to do it. But first I would like to pay homage to the following that helped me visualize the solution:</p>
<ol>
<li><a href="http://justintadlock.com/archives/2007/11/07/how-to-create-tabs-using-jquery">How To Create Tabs Using JQuery</a> – This article by Justin Tadlock, the creator of the awesome Hybrid Theme, was something I used for version 2.0 of Suffusion, where I introduced the tabbed options panel of Suffusion. </li>
<li><a href="http://wordpress.org/support/topic/267424?replies=6">Widget container HTML (and missing titles)</a> – A thread on the WP forums started (and resolved) by <a href="http://digitalnature.ro/">DigitalNature</a>, the creator of the Mystique and some other popular themes, regarding an issue with widgets that do not have titles </li>
</ol>
<h4>The Foundation</h4>
<p>If you go through Justin’s tutorial you will get the basic gist of how to build a tabbed box. Basically you need to set up 3 things:</p>
<ol>
<li>The HTML markup </li>
<li>The CSS </li>
<li>The JQuery for the actual tab effects </li>
</ol>
<p>The HTML markup requires your page’s source code to look similar to this (like Justin’s example, the differences being in the way I named my classes):</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;sidebar&quot; class=&quot;tabbed-sidebar&quot;&gt;
	&lt;!-- The tabs --&gt;
	&lt;ul class=&quot;sidebar-tabs&quot;&gt;
	&lt;li id=&quot;t1&quot; class=&quot;sidebar-tab t1&quot;&gt;&lt;a class=&quot;sidebar-tab t1&quot; title=&quot;Tab 1&quot;&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;t2&quot; class=&quot;sidebar-tab t2&quot;&gt;&lt;a class=&quot;sidebar-tab t2&quot; title=&quot;Tab 2&quot;&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;t3&quot; class=&quot;sidebar-tab t3&quot;&gt;&lt;a class=&quot;sidebar-tab t3&quot; title=&quot;Tab 3&quot;&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;t4&quot; class=&quot;sidebar-tab t4&quot;&gt;&lt;a class=&quot;sidebar-tab t4&quot; title=&quot;Tab 4&quot;&gt;Tab 4&lt;/a&gt;&lt;/li&gt;
	&lt;ul&gt;

	&lt;!-- tab 1 --&gt;
	&lt;div class=&quot;sidebar-tab-content sidebar-tab-content-t1&quot;&gt;
	&lt;!-- Put what you want in here.  For the sake of this tutorial, we'll make a list.  --&gt;
	&lt;ul&gt;
		&lt;li&gt;List item&lt;/li&gt;
		&lt;li&gt;List item&lt;/li&gt;
		&lt;li&gt;List item&lt;/li&gt;
		&lt;li&gt;List item&lt;/li&gt;
		&lt;li&gt;List item&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/div&gt;

	&lt;!-- tab 2 --&gt;
	&lt;div class=&quot;sidebar-tab-content sidebar-tab-content-t2&quot;&gt;
	&lt;!-- Or, we could put a paragraph --&gt;
		&lt;p&gt;This is a paragraph about the jQuery tabs tutorial.&lt;/p&gt;
	&lt;/div&gt;

	&lt;!-- tab 3 --&gt;
	&lt;div class=&quot;sidebar-tab-content sidebar-tab-content-t3&quot;&gt;
	&lt;!-- Or, we could add a div --&gt;
		&lt;div&gt;Something needs to go in here!&lt;/div&gt;
	&lt;/div&gt;

	&lt;!-- tab 4 --&gt;
	&lt;div class=&quot;sidebar-tab-content sidebar-tab-content-t4&quot;&gt;
	&lt;!-- Why not put a few images in here? --&gt;
		&lt;p&gt;
			&lt;img src=&quot;image.gif&quot; alt=&quot;Sample&quot; /&gt;
			&lt;img src=&quot;image.gif&quot; alt=&quot;Sample&quot; /&gt;
			&lt;img src=&quot;image.gif&quot; alt=&quot;Sample&quot; /&gt;
		&lt;/p&gt;
	&lt;/div&gt;

&lt;/div&gt;&lt;!-- tabbed-sidebar --&gt;
</pre>
<p>Now for the JQuery code to run this:</p>
<pre class="brush: jscript; title: ; notranslate">
$j = jQuery.noConflict(); 

$j('div.tabbed-sidebar ul.sidebar-tabs li:first').addClass('sidebar-tab-first');
$j('div.tabbed-sidebar div.sidebar-tab-content:first').addClass('sidebar-tab-content-first');
$j('div.tabbed-sidebar div.sidebar-tab-content').hide();
$j('div.sidebar-tab-content-first').show();
$j('div.tabbed-sidebar ul.sidebar-tabs li.sidebar-tab-first a').addClass('tab-current'); 

$j('div.tabbed-sidebar ul.sidebar-tabs li a').click(function(){
	var thisClass = this.className.substring(12, this.className.length);
	$j('div.tabbed-sidebar div.sidebar-tab-content').hide();
	$j('div.tabbed-sidebar div.sidebar-tab-content-' + thisClass).show();
	$j('div.tabbed-sidebar ul.sidebar-tabs li a').removeClass('tab-current');
	$j(this).addClass('tab-current');
});
</pre>
<p>The above code simply does the following:</p>
<ol>
<li>Adds the classes “sidebar-tab-first” and “sidebar-tab-content-first” to the tab and content. We could have done this directly in our markup, but the reason for doing it in JQuery will soon become clear.</li>
<li>Hides all “content” divs, shows the first content div (with class sidebar-tab-content-first), then adds the “tab-current” class to the first tab (with class sidebar-tab-first)</li>
<li>Adds a click function to each tab, making it display the associated content by determining the class of the tab.</li>
</ol>
<h4>So Where is the Problem?</h4>
<p>So far we have done something fairly simple for a person with basic JQuery knowledge. The problem lies in tying this with dynamic sidebars. Consider the fact that the definition of a sidebar requires the following parameters:</p>
<ol>
<li>$before_widget</li>
<li>$after_widget</li>
<li>$before_title</li>
<li>$after_title</li>
</ol>
<p>These are parameters that apply to the creation of individual widgets, not the overall sidebar. If you notice our HTML markup in the previous section, we have created separate sections with all the tabs isolated from the content. <em>But this is not possible for widget definition!!</em> In other words, the widgets print one after the other, so each tab (i.e. the title of a widget) is grouped with the body of the widget, followed by the tab for the next widget and its body, etc. In WP-speak, the widgets typically print $before_widget, then $before_title, then the title, then $after_title, then the content and finally $after_widget. Or course there is nothing preventing a widget author from going bonkers and messing up the order, or not using one of the tags above etc. But that is the widget author’s problem. Assuming that the widgets are coded in a standard fashion, the code doesn’t quite render in a way conducive to tabbed sidebars.</p>
<h4>The Fix</h4>
<p>The fix is intuitive and is wholly borrowed from the WP forum post I lined to in the above. First we register the sidebar with parameters as follows:</p>
<ol>
<li>before_widget: &#8216;&lt;li id=&quot;%1$s&quot; class=&quot;sidebar-tab %2$s&quot;&gt;&lt;a class=&quot;sidebar-tab&quot;&gt;&#8217;</li>
<li>after_widget: &#8216;&lt;/div&gt;&lt;/li&gt;&#8217;</li>
<li>before_title: &#8221; <em>(a blank)</em></li>
<li>after_title: &#8216;&lt;/a&gt;&lt;div class=&quot;sidebar-tab-content&quot;&gt;&#8217;</li>
</ol>
<p>Note the following:</p>
<ol>
<li>We are creating the content as a “div” object within the “li” object. </li>
<li>We are unable to assign the widget class (“%2$s”) or the widget id (“%1$s”) to the “a” element.</li>
</ol>
<p>Now we will pull a trick using JQuery. We will modify the JQuery code thus:</p>
<pre class="brush: jscript; title: ; notranslate">
$j = jQuery.noConflict();

$j('.sidebar-tab .sidebar-tab-content').each(function() {
	var parentId = this.parentNode.id;
	var parentClass = this.parentNode.className;
	parentClass = parentClass.substring(12);
	$j(this).addClass('sidebar-tab-content-' + parentId);
	$j(this).addClass(parentClass);
	$j(this).appendTo(this.parentNode.parentNode.parentNode);
}); 

$j('.tabbed-sidebar ul.sidebar-tabs a').each(function() {
	var parentId = this.parentNode.id;
	$j(this).addClass(parentId);
});

$j('div.tabbed-sidebar ul.sidebar-tabs li:first').addClass('sidebar-tab-first');
$j('div.tabbed-sidebar div.sidebar-tab-content:first').addClass('sidebar-tab-content-first');
$j('div.tabbed-sidebar div.sidebar-tab-content').hide();
$j('div.sidebar-tab-content-first').show();
$j('div.tabbed-sidebar ul.sidebar-tabs li.sidebar-tab-first a').addClass('tab-current'); 

$j('div.tabbed-sidebar ul.sidebar-tabs li a').click(function(){
	$j(this).removeClass('tab-current');
	var thisClass = this.className.substring(12, this.className.length);
	var parentId = this.parentNode.parentNode.parentNode.id;
	$j('#' + parentId + '.tabbed-sidebar div.sidebar-tab-content').hide();
	$j('#' + parentId + '.tabbed-sidebar div.sidebar-tab-content-' + thisClass).show();
	$j('#' + parentId + '.tabbed-sidebar ul.sidebar-tabs li a').removeClass('tab-current');
	$j(this).addClass('tab-current');
});
</pre>
<p>What we did is this:</p>
<ol>
<li>After the page was loaded, we moved the “sidebar-tab-content” objects out of the “li” objects and appended those to the “sidebar-tabs” list as a whole. We did this by smart use of the JQuery “appendTo” function to add every tab’s content to its grandparent.</li>
<li>Did all the necessary class additions that we couldn’t in our widget setup, again by fetching it from the parent / grandparent and using the “addClass” function.</li>
<li>Added other necessities like the classes for the first tab etc.</li>
</ol>
<p>That’s basically it. The JavaScript neatly rearranges our code into something conducive for tabbing, then applies the tabbing effects.</p>
<h4>Is Everything Hunky-Dory?</h4>
<p>Maybe. Let’s first see what advantages it gives us:</p>
<ol>
<li>You are not constrained by a rigid framework. Most of your widgets will seamlessly tie in with this sidebar.</li>
<li>With a little extra effort you can make every sidebar behave this way without repeating this code. You just have to be smart with the sidebar ids and use them while doing the hide/show.</li>
</ol>
<p>Now let’s first examine cases where the tabbing will not work:</p>
<ol>
<li>If your widget has no title, obviously there is no handle for the content in the tab-bar and the result is not pretty. This is not a shortcoming of the code – it is more like a user error. Imagine looking for a document without a title.</li>
<li>If a widget author has not followed standard WP guidelines and has ignored the $before_title and $after_title tags and decided to specify his own, that too will cause issues, because the JQuery is relying on certain classes to be named in a certain manner. As I mentioned in the previous section, this is really bad coding on the part of the widget author.</li>
</ol>
<p>Lastly let’s see what the pitfalls are:</p>
<ol>
<li>If your page is not using JQuery currently, adding this capability will require it to do so. That might slow your page down.</li>
<li>If you have a lot of content on your page and if your images are heavy, the JQuery code will be the last to load. While your page is loading the users will see a haphazard layout of the sidebar and once the script is executed at the end of the page load the layout will click in place. </li>
</ol>
<p>That’s about it. If anyone has a better approach do let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/05/building-a-dynamic-tabbed-sidebar-using-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Custom PHP with Suffusion</title>
		<link>http://aquoid.com/news/2010/05/using-custom-php-with-suffusion/</link>
		<comments>http://aquoid.com/news/2010/05/using-custom-php-with-suffusion/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:16:24 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/05/using-custom-php-with-suffusion/</guid>
		<description><![CDATA[One of Suffusion’s neat little features is the Custom Styles option. Based on some feedback that I had received from some users, in release 3.4.2 I provided a way to bundle custom PHP with your installation. In this post I will walk you through the following scenarios explaining how you can use this functionality: Adding <a href='http://aquoid.com/news/2010/05/using-custom-php-with-suffusion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>One of Suffusion’s neat little features is the <a href="http://www.aquoid.com/news/2010/02/there-are-some-things-suffusion-cant-do-for-everything-else-there-is-the-custom-styles-option/">Custom Styles</a> option. Based on some feedback that I had received from some users, <a href="http://www.aquoid.com/news/2010/03/suffusion-version-3-4-2/">in release 3.4.2 I provided a way to bundle custom PHP</a> with your installation.</p>
<p>In this post I will walk you through the following scenarios explaining how you can use this functionality:</p>
<ol>
<li>Adding your own meta tags. </li>
<li>Creating your own short codes. </li>
<li>Passing extra parameters to queries for fetching posts. </li>
</ol>
<p>Here is how you begin:</p>
<ol>
<li>Create a PHP file called, say, custom-code.php. Put this file somewhere under your “wp-content” folder, but not under the “suffusion” folder. <strong>If you put it in the “suffusion” folder it will get overwritten upon an upgrade!</strong> </li>
<li>Go to Suffusion Theme Options <em>→</em> Blog Features <em>→</em> Custom Includes <em>→</em> Custom PHP. Put in the file name with the path, as instructed. </li>
<li>Now for some serious business. Open the file you created in an editor. You could use any editor that you want (but not a Word Processor!!), like Notepad or <a href="http://www.vim.org/">Vim</a> or <a href="http://www.gnu.org/software/emacs/">Emacs</a> or <a href="http://www.editplus.com/">EditPlus</a> or <a href="http://www.textpad.com/">Textpad</a>. Your choice depends on your individual preferences and your Operating System. I personally use Vim for editing minor things because of my Unix-based background, and a full-blown IDE like <a href="http://www.jetbrains.com/phpstorm/index.html">PhpStorm</a> or <a href="http://www.aptana.com/">Aptana Studio</a> or <a href="http://www.eclipse.org/">Eclipse</a> for the heavy-duty stuff.       <br />Now build the shell for the file as follows:
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * Custom includes
 */
?&gt;
</pre>
<p>Make sure that you have no white-spaces or new lines or text before the “&lt;?php” or after the “?&gt;”. <strong>This is critical. If you have spaces there, you will get nasty PHP errors that will require you to replace file/folder contents using FTP.</strong> </li>
</ol>
<p>Now let us address each of our scenarios.</p>
<h4>Scenario 1: Adding your own meta tags</h4>
<p>This is something I have addressed on the <a href="http://www.aquoid.com/forum/viewtopic.php?f=4&amp;t=1720#p7716">support forum</a>. Let’s say you want to create your own meta tags with name “my-custom-tag” and value “my-custom-tag-value”. Here is what your code looks like:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * Custom includes
 */
//The hook for publishing the document header is suffusion_document_header.
//This tells the code to add an extra action to suffusion_document_header:
add_action('suffusion_document_header', 'suffusion_include_custom_meta_tags');

function suffusion_include_custom_meta_tags() {
    echo &quot;&lt;meta name=&quot;&quot;my-custom-tag&quot;&quot; content=&quot;&quot;my-custom-tag-value&quot;&quot; /&gt;n&quot;;;
}
?&gt;
</pre>
<p>That’s it. You can add as many “echo” statements as you want in the “suffusion_include_custom_meta_tags” function.</p>
<h4>Scenario 2: Creating your own Short Codes</h4>
<p>The ability to use your own <a href="http://codex.wordpress.org/Shortcode_API">short codes</a> with Suffusion speeds up things several notches. The following code is from <a href="http://www.aquoid.com/news/2010/02/suffusion-version-3-3-0/">one of my previous posts</a>, and it demonstrates how to add a short code that will execute any PHP function. You can add it within the “&lt;?php” and “?&gt;” tags:</p>
<pre class="brush: php; title: ; notranslate">
function sc_php_function($attr) {
    $function = $attr['function'];
    $params = $attr['params'];
    $params = explode(&quot;||&quot;, $params);

    if (is_callable($function)) {
        $ret = call_user_func_array($function, $params);
    }

    return $ret;
}

add_shortcode('php-function', 'sc_php_function');
</pre>
<p>This will create a short code called “php-function” which is like RDX – it will let you execute any PHP function from within a post or a page.</p>
<p class="note">The short code above is dangerous if you have a multi-user blog, or if you are using a plugin that enables short codes in the comments section, because it will let <em>anyone</em> execute <em>any PHP function</em> on your site – it is a significant security risk, so use it with utmost care!</p>
<p>&#160;</p>
<h4>Scenario 3: Passing extra parameters to queries for fetching posts</h4>
<p>I <a href="http://www.aquoid.com/news/2010/04/suffusion-version-3-4-5/">recently introduced a hook</a> called “suffusion_query_posts”. This hook is executed before your posts are parsed (aka The Loop), so you can use this to modify what you want to display. It is present on different templates, like Author, Category, Date, Index, Page of Posts, Search and Tag. Let’s say you want to exclude posts belonging to the category with id 15. Here is what you add in the PHP code in the file:</p>
<pre class="brush: php; title: ; notranslate">
add_action('suffusion_query_posts', 'suffusion_query_enhancer');
function suffusion_query_enhancer() {
    global $wp_query, $query_string;
    $query_string .= &quot;&amp;cat=-15&quot;;
}
</pre>
<p>You could think of a lot of other scenarios where you could use the custom PHP inclusion. Note that like its more popular cousin, the Custom Styles, this too is upgrade-proof. It also adds to Suffusion the feel of a theme framework. If you are looking to add some functionality and you don’t see a hook for it, do post your query on the <a href="http://www.aquoid.com/forum">support forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/05/using-custom-php-with-suffusion/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Useful Plugins for Suffusion</title>
		<link>http://aquoid.com/news/2010/04/useful-plugins-for-suffusion/</link>
		<comments>http://aquoid.com/news/2010/04/useful-plugins-for-suffusion/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 20:34:10 +0000</pubDate>
		<dc:creator>Sayontan</dc:creator>
				<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://www.aquoid.com/news/2010/04/useful-plugins-for-suffusion/</guid>
		<description><![CDATA[Having a lot of features also makes people request for more features to be added to Suffusion. In this post I will call out a few WordPress plugins that are extremely useful and can help you in a major way set up a Suffusion-powered blog. Page Links To, Redirection ”Page Links To” and “Redirection” are <a href='http://aquoid.com/news/2010/04/useful-plugins-for-suffusion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Having a lot of features also makes people request for more features to be added to Suffusion. In this post I will call out a few WordPress plugins that are extremely useful and can help you in a major way set up a Suffusion-powered blog.</p>
<ol>
<li><strong><u>Page Links To, Redirection</u></strong>       <br />”<a href="http://wordpress.org/extend/plugins/page-links-to/">Page Links To</a>” and “<a href="http://wordpress.org/extend/plugins/redirection/">Redirection</a>” are two plugins for the same purpose – creating pages that redirect elsewhere. On the surface this appears like no big deal, but once you scratch the surface you realize the power that this kind of a feature offers you. For starters, you can create new pages that point to just about anything: external links, specific posts, categories, tags – you name it. Combine this with the fact that you can define parent pages for pages, and you will have a neat hierarchical structure created with minimum fuss. Take this hierarchical structure and make a navigation menu out of it – it is that simple to create a truly custom navigation menu.      <br />I have used “Redirection” myself and found that it works pretty well, however some of the theme’s users have reported problems with it. I have, since then, started recommending the “Page Links To” plugin.</li>
<li><strong><u>Widget Logic</u></strong>      <br />One frequently asked question on the support forums is regarding having different sidebar contents for different pages. The answer to all such questions is the rather intuitive <a href="http://wordpress.org/extend/plugins/widget-logic/">Widget Logic</a> plugin. Widget Logic lets you control each widget’s presence in a page or post or view, so you can very easily achieve the kind of sidebars you are looking for.</li>
<li><strong><u>Exec-PHP</u></strong>      <br />The <a href="http://wordpress.org/extend/plugins/exec-php/">Exec-PHP</a> plugin lets you run snippets of PHP code wherever you want. So you are no longer restricted to writing HTML / JavaScript code in widgets – you can use PHP as well. </li>
<li><strong><u>My Page Order, My Link Order, My Category Order</u></strong>      <br />Suffusion natively supports these plugins. As their names suggest, <a href="http://wordpress.org/extend/plugins/my-page-order/">My Page Order</a> lets you define a custom order for your pages, <a href="http://wordpress.org/extend/plugins/my-category-order/">My Category Order</a> lets you define a custom order for your categories and <a href="http://wordpress.org/extend/plugins/my-link-order/">My Link Order</a> lets you define a custom order for your links. The plugins offer drag-and-drop interfaces, so changing the sequence is really easy. The order you set is automatically pulled up in the navigation menus of Suffusion.</li>
</ol>
<p>Any more that you would like to pitch in?</p>
]]></content:encoded>
			<wfw:commentRss>http://aquoid.com/news/2010/04/useful-plugins-for-suffusion/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

