<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Kavin</title>
	
	<link>http://kav.in</link>
	<description>Design, Web and WordPress.</description>
	<lastBuildDate>Fri, 10 May 2013 16:59:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Capability" /><feedburner:info uri="capability" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Capability</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Capability" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FCapability" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>WP-UI : Drastic changes ahead</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/HmDv-Fr-j7M/</link>
		<comments>http://kav.in/wp-ui-changes-ahead-0-8-7/#comments</comments>
		<pubDate>Fri, 10 May 2013 15:41:49 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Web designing]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>

		<guid isPermaLink="false">http://kav.in/?p=1099</guid>
		<description><![CDATA[Help Improve WP UI]]></description>
			<content:encoded><![CDATA[<p>Upcoming releases of WP UI will likely be slimmer and more faster. This will start by removing some of the unused and unnecessarily complicated features.<br />
<span id="more-1099"></span></p>
<p>Please take a moment to answer these simple questions. You can improve WP UI a lot by doing so!</p>
<p><script type="text/javascript" src="http://i0.poll.fm/survey.js" charset="UTF-8"></script><br />
<noscript><a href="http://openone.polldaddy.com/s/wp-ui">Take Our Survey!</a></noscript><br />
<script type="text/javascript">
  polldaddy.add( {
    type: 'iframe',
    auto: true,
    domain: 'openone.polldaddy.com/s/',
    id: 'wp-ui'
  } );
</script></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=HmDv-Fr-j7M:0HR8lO52CO8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=HmDv-Fr-j7M:0HR8lO52CO8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=HmDv-Fr-j7M:0HR8lO52CO8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=HmDv-Fr-j7M:0HR8lO52CO8:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=HmDv-Fr-j7M:0HR8lO52CO8:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/HmDv-Fr-j7M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wp-ui-changes-ahead-0-8-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kav.in/wp-ui-changes-ahead-0-8-7/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wp-ui-changes-ahead-0-8-7</feedburner:origLink></item>
		<item>
		<title>Latest WP UI from GitHub</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/oeA-rf1C9b0/</link>
		<comments>http://kav.in/latest-wp-ui-from-github/#comments</comments>
		<pubDate>Wed, 01 May 2013 18:22:54 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Default]]></category>

		<guid isPermaLink="false">http://kav.in/?p=1095</guid>
		<description><![CDATA[Hai Everybody, WP UI has been updated to work with latest WP versions a quite a while back. You can get it from GitHub for now, Atleast till I am able to get the WP SVN committing working again. Apologies for the troubles and the delay. +Kavin]]></description>
			<content:encoded><![CDATA[<p>Hai Everybody, </p>
<p>WP UI has been updated to work with latest WP versions a quite a while back. You can get it  from <a href="https://github.com/kavingray/WP-UI" title="Get WP UI  from GitHub">GitHub</a> for now, Atleast till I am able to get the WP SVN committing working again. </p>
<p>Apologies for the troubles and the delay.</p>
<p>+Kavin</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=oeA-rf1C9b0:9Lc0LOHQ9aQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=oeA-rf1C9b0:9Lc0LOHQ9aQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=oeA-rf1C9b0:9Lc0LOHQ9aQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=oeA-rf1C9b0:9Lc0LOHQ9aQ:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=oeA-rf1C9b0:9Lc0LOHQ9aQ:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/oeA-rf1C9b0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/latest-wp-ui-from-github/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://kav.in/latest-wp-ui-from-github/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=latest-wp-ui-from-github</feedburner:origLink></item>
		<item>
		<title>WP UI Quick start</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/RGBUgJ0LoEw/</link>
		<comments>http://kav.in/wp-ui-quick-start/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 08:30:42 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Default]]></category>

		<guid isPermaLink="false">http://kav.in/?p=1079</guid>
		<description><![CDATA[Check out the Quick start guide on WP UI.]]></description>
			<content:encoded><![CDATA[<p>Check out the <a href="http://kav.in/projects/blog/wp-ui-quick-start/" title="WP UI How to" target="_blank">Quick start guide on WP UI</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=RGBUgJ0LoEw:xsjOIYoJKBg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=RGBUgJ0LoEw:xsjOIYoJKBg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=RGBUgJ0LoEw:xsjOIYoJKBg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=RGBUgJ0LoEw:xsjOIYoJKBg:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=RGBUgJ0LoEw:xsjOIYoJKBg:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/RGBUgJ0LoEw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wp-ui-quick-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kav.in/wp-ui-quick-start/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wp-ui-quick-start</feedburner:origLink></item>
		<item>
		<title>WP UI – Using Multiple jQuery UI custom themes</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/xFISzmRBT7E/</link>
		<comments>http://kav.in/wp-ui-using-jquery-ui-custom-themes/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 00:00:09 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web designing]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[collapsibles]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sliders]]></category>
		<category><![CDATA[spoilers]]></category>
		<category><![CDATA[Tabs]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wp-ui]]></category>

		<guid isPermaLink="false">http://kav.in/?p=1025</guid>
		<description><![CDATA[With WP UI 0.5.5, it is now possible to use multiple custom themes downloaded from jQuery UI themeroller. Till now it was not straight away possible to use even multiple jQuery UI themes on the same page, but trust me, with this guide, it&#8217;s a breeze! Create and download the custom theme from themeroller Visit [...]]]></description>
			<content:encoded><![CDATA[<p>With WP UI <strong>0.5.5</strong>, it is now possible to use multiple custom themes downloaded from jQuery UI themeroller. Till now it was not straight away possible to use even multiple jQuery UI themes on the same page, but trust me, with this guide, it&#8217;s a breeze!</p>
<p><span id="more-1025"></span></p>
<h2 id="create-and-download-the-custom-theme-from-themeroller">Create and download the custom theme from themeroller</h2>
<p>Visit the <a title="Roll your own themes using ThemeRoller" href="http://jqueryui.com/themeroller/" rel="nofollow">jQuery UI themeroller page</a>. You will now land on the <span class="spancode">Roll Your Own</span> tab. You can start customizing your theme from here.</p>
<div class="wp-caption" style="width: 580px;"><a class="thickbox" href="http://kav.in/blog/wp-content/uploads/2011/08/1-open-themegallery.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="1-open-themegallery" src="http://kav.in/blog/wp-content/uploads/2011/08/1-open-themegallery_thumb.png" alt="1-open-themegallery" width="580" height="374" border="0" /></a></p>
<p class="wp-caption-text">jQuery UI theme roller</p>
</div>
<p>If you want to base your custom theme on another theme, click the &#8220;gallery tab&#8221;, and click edit under the desired theme.</p>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/2-base-theme.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Basing a custom theme from another jQuery UI theme" src="http://kav.in/blog/wp-content/uploads/2011/08/2-base-theme_thumb.png" alt="Basing a custom theme from another jQuery UI theme" width="580" height="375" border="0" /></a></p>
<p class="wp-caption-text">Choosing a theme as the base</p>
</div>
<p>Customize the theme to your heart&#8217;s content.</p>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/3-customize-download-theme.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Customize and download a jQuery UI theme with themeroller" src="http://kav.in/blog/wp-content/uploads/2011/08/3-customize-download-theme_thumb1.png" alt="Customize and download a jQuery UI theme" width="580" height="375" border="0" /></a></p>
<p class="wp-caption-text">Customize and Click Download theme.</p>
</div>
<p>Now comes the essential part, entering the correct CSS scope and folder name. I chose <strong>.wpui-custom and wpui-custom</strong> as an example, and this will be the argument to the WP UI shortcodes later on.</p>
<pre class="minimal">[<span>wptabs style="wpui-custom"</span>] ....................

[<span>wptabs type="accordion" style="wpui-custom"</span>]....</pre>
<blockquote>
<ol>
<li>As it is essentially a CSS class name, it shall contain <span style="color: #c0504d;">alphabets, letters(not as the first character though), hyphens and underscore</span>.</li>
<li>Make sure you enter the <span style="color: #ff0000;">preceding dot</span>before the CSS scope.</li>
<li>You can also click &#8220;<span style="color: #9b00d3;">unselect components</span>&#8220;, before clicking download. This will cut down the download size to  400KB~</li>
</ol>
</blockquote>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/4-css-scope-jquery-ui-themes.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Choosing CSS scope in jQuery UI themes with WP UI " src="http://kav.in/blog/wp-content/uploads/2011/08/4-css-scope-jquery-ui-themes_thumb.png" alt="4-wp-ui-css-scope-jquery-ui-themes" width="580" height="362" border="0" /></a></p>
<p class="wp-caption-text">Choosing a CSS scope</p>
</div>
<p>Click Download and then save the file (named something like jquery-ui-1.8.xx-custom.zip.)</p>
<h2 id="uploading-the-files-to-your-server">Uploading the files to your server</h2>
<p>Unzip the downloaded file and in the folder unzipped, navigate inside the CSS folder. There should the folder &#8220;wpui-custom&#8221; , as per our example and we chose that at the last step. This is the only folder we need to upload.</p>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/6-wpui-custom-theme-folders.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="jQuery UI theme folder extraction" src="http://kav.in/blog/wp-content/uploads/2011/08/6-wpui-custom-theme-folders_thumb.png" alt="6-wpui-custom-theme-folders" width="580" height="208" border="0" /></a></p>
<p class="wp-caption-text">Extract the custom theme folder from the downloaded file</p>
</div>
<p>Fire up your FTP client, login to your server and browse to your uploads directory.</p>
<p>If the wordpress blog is in <a href="http://example.com/blog">http://example.com/blog</a> ,then the uploads folder should be at /blog/wp-content/uploads/ , assuming that your wordpress is installed in the folder &#8220;blog&#8221; present in the root folder. Basic guide on using FileZilla is at <a title="Using FileZilla with WordPress" href="http://codex.wordpress.org/Using_FileZilla">codex</a>.</p>
<p>This should brief that in a bit.</p>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/5-uploading-jquery-ui-custom-themes.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Upload jQuery UI custom themes to wordpress with FileZilla" src="http://kav.in/blog/wp-content/uploads/2011/08/5-uploading-jquery-ui-custom-themes_thumb.png" alt="Filezilla-uploading-jquery-ui-themes-to-wordpress" width="580" height="418" border="0" /></a></p>
<p class="wp-caption-text">Create and upload the custom themes inside the folder &#8211; wp-ui, under uploads</p>
</div>
<p>That&#8217;s all, the hard part&#8217;s over. Now the fun part.</p>
<h2 id="manage-jquery-ui-custom-themes-with-wp-ui">Manage jQuery UI custom themes with WP UI</h2>
<ul>
<li>Go to <span class="spancode">wordpress admin</span> -&gt; <span class="spancode">WP UI options page </span>-&gt; <span class="spancode">Style Tab</span> -&gt; <span class="spancode">Manage jQuery UI custom themes</span>. See that empty table over there? That&#8217;s ready for some fresh made Custom themes.</li>
<li>Click <span class="spancode">scan uploads</span>, it should start scanning the <span class="spancode">uploads/wp-ui</span>directory and add them to the list.</li>
<li>Do you have your theme uploaded elsewhere,want to link the theme? Click Add Theme.</li>
<li>Need to edit that last entered theme? just Double click anywhere on the row, edit box will open up.</li>
</ul>
<p>Now just click changes and you are ready to go!</p>
<div class="wp-caption" style="width: 580px;"><a href="http://kav.in/blog/wp-content/uploads/2011/08/7-wpui-custom-theme-manager.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="7-wpui-custom-theme-manager" src="http://kav.in/blog/wp-content/uploads/2011/08/7-wpui-custom-theme-manager_thumb.png" alt="7-wpui-custom-theme-manager" width="580" height="476" border="0" /></a></p>
<p class="wp-caption-text">Managing Custom themes in WP UI options page</p>
</div>
<h3 id="using-the-custom-themes-with-shortcodes">Using the custom themes with Shortcodes</h3>
<p>Remember that shortcode argument I told you earlier? Yes, that is now the style&#8217;s name. To use it, take for example with our example customize-downloaded-custom(ah!) theme &#8220;wpui-custom&#8221; ,</p>
<pre class="minimal">[<span>wptabs style="wpui-custom"</span>]...............</pre>
<p>Now view the front end of your blog, your tabs and accordion should be using custom themes you created!</p>
<p>Cheerio!</p>
<p>Kavin</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=xFISzmRBT7E:uK_wFCJTX98:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=xFISzmRBT7E:uK_wFCJTX98:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=xFISzmRBT7E:uK_wFCJTX98:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=xFISzmRBT7E:uK_wFCJTX98:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=xFISzmRBT7E:uK_wFCJTX98:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/xFISzmRBT7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wp-ui-using-jquery-ui-custom-themes/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		<feedburner:origLink>http://kav.in/wp-ui-using-jquery-ui-custom-themes/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wp-ui-using-jquery-ui-custom-themes</feedburner:origLink></item>
		<item>
		<title>WP UI – WordPress Tabs, Accordions, spoilers plugin</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/30SOR0ARWvY/</link>
		<comments>http://kav.in/wp-ui-for-wordpress/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 22:41:34 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[collapsibles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[sliders]]></category>
		<category><![CDATA[Tabs]]></category>
		<category><![CDATA[wp-ui]]></category>

		<guid isPermaLink="false">http://kav.in/?p=967</guid>
		<description><![CDATA[WP UI for WordPress is a plugin that lets you add smart, beautiful and responsive interface widgets, such as Tabs, Accordions, spoilers, Dialogs into your wordpress posts. This plugin is built on top of the jQuery UI and comes bundled with rich documentation, extended browser support and detailed skins and themes. Important : New version [...]]]></description>
			<content:encoded><![CDATA[<p>WP UI for WordPress is a plugin that lets you add smart, beautiful and responsive interface widgets, such as <u>Tabs, Accordions, spoilers, Dialogs</u> into your wordpress posts. This plugin is built on top of the <a title="jQuery UI" href="http://jqueryui.com" target="_blank">jQuery UI</a> and comes bundled with rich documentation, extended browser support and detailed skins and themes.</p>
<p><span id="more-967"></span></p>
<div style="clear: both"></div>
<div style="display: none; text-align:center;" class="message-notification">Important : <a href="#changes_056">New version 0.7 [ 08/09/11 ], Please resave the options. </a></div>
<div class="cap-downloads"><span class="cap-demo-link"><a href="http://kav.in/projects/blog/wp-ui-tabs-accordion-sliders-demo/" target="_blank">Demo</a> </span><span class="cap-download-link"><a href="http://wordpress.org/extend/plugins/wp-ui/" target="_blank">Download</a> </span> <span class="cap-support-link"><a href="http://kav.in/forum" target="_blank">Support</a> </span></div>
<div style="clear: both"></div>

<h3 id="overview">Overview</h3>
<p>WP UI gives you the easier way for the Articles that stand out. Most of the WP UI&#8217;s features are implemented with wordpress shortcodes, which means that learning curve is smooth and there is no compromise between appearance and performance. It can significantly reduce the length of your articles, making it easier to read and digest.</p>
<p>WP UI comes with the following components.</p>
<div style="clear: both"></div>
<table class="minimal" style="width : 100% ">
<thead>
<tr>
<th>Component</th>
<th>Shortcode</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tabs</td>
<td>[<span>wptabs</span>] Wraps the tabs
<ul>
<li>[<span>wptabtitle</span>]Name of the tab</li>
<li>[<span>wptabcontent</span>]Contents of the tab</li>
</ul>
</td>
</tr>
<tr>
<td>Accordion</td>
<td>[<span>wptabs type="accordion"</span>] Wraps the Accordion
<ul>
<li>[<span>wptabtitle</span>]Title of the accordion</li>
<li>[<span>wptabcontent</span>]Contents of the Accordion panel</li>
</ul>
</td>
</tr>
<tr>
<td>Collapsibles</td>
<td>[<span>wpspoilers</span>]</td>
</tr>
<tr>
<td>Dialogs</td>
<td>[<span>wpdialog</span>]</td>
</tr>
</tbody>
</table>
<p>Please note : All WP UI shortcodes except when they are used to get and display posts are enclosing shortcodes, that means every shortcode opened should be closed. For example:</p>
<pre>
	[<span>wptabs</span>] // Opening shortcode	
	[/<span>wptabs</span>] // closing shortcode
</pre>
<p>&nbsp;</p>
<p>Alternative shortcodes are also available.</p>
<ul><!--StartFragment--></p>
<li><strong>[<span>tabname</span>]</strong> instead of [<span>wptabtitle</span>]
<li><strong>[<span>tabcont</span>]</strong> instead of [<span>wptabcontent</span>]
<li><strong>[<span>tabs</span>]</strong> instead of [<span>wptabs</span>]
<li><strong>[<span>slider</span>]</strong> instead of [<span>wpspoiler</span>]
<li><strong>[<span>dialog</span>]</strong> instead of [<span>wpdialog</span>]
</ul>
<p>When using alternative shortcodes, make sure that they do not conflict with shortcodes from another plugin.</p>
<p>&nbsp;</p>
<h3 id="features">Features</h3>
<p><strong>Style</strong></p>
<ul>
<li>14 unique attractive CSS3 styles.</li>
<li>Ability all the jQuery UI themes</li>
<li>Custom theme manager that handles the custom styles downloaded from jQuery UI themeroller</li>
</ul>
<p><strong>Content</strong></p>
<ul>
<li>Include your posts, pages either single or multiple with a single shortcode.</li>
<li>Smooth learning curve with the ability to handle most of the complex Web content</li>
<li>Support for Nested tabs and AJAX loading inside the panels.</li>
</ul>
<p><strong>Help and support</strong></p>
<ul>
<li>Documentation available right in the wordpress editor page.</li>
<li>Support <a href="http://kav.in/forum" target="_blank">forums</a> available right here</li>
</ul>
<p>&nbsp;</p>
<h3 id="usage-of-tabs,-accordions,-spoilers-and-dialogs">Usage of tabs, accordions, spoilers and dialogs</h3>
<p>As mentioned earlier, all WP UI shortcodes are enclosing <a href="http://codex.wordpress.org/Shortcode_API" target="_blank">shortcodes</a>, customizable with arguments [<a href="http://codex.wordpress.org/Shortcode_API" target="_blank">Codex : Shortcodes</a>]. Please take a note of the below recommendations.</p>
<ul>
<li>Shortcodes work best when they are entered through the HTML mode of the wordpress editor.</li>
<li>Different Shortcodes need to be in separate lines, but avoid the empty lines in between them. For example [<span>wptabtitle</span>] and [<span>wptabcontent</span>] shortcodes inside wptabs.</li>
</ul>
<h4 id="wp-ui-components-and-their-usage">WP UI Components and their usage</h4>
<p>The first one below lists all the shortcodes, arguments and the possible values. Second one below holds some sample shortcode structures.</p>
<div id="wp-spoiler-1" class="wp-spoiler wpui-hashable wpui-light wpui-styles">  <h3 id="shortcodes_arguments_and_values" class="wp-spoiler-title wpui-hashable fade-true slide-true open-false">Shortcodes, Arguments and values</h3><div class="wpui-hidden wp-spoiler-content"><br />
<div id="wp-tabs-1" class="wp-tabs wpui-light wpui-styles wpui-tabs-vertical"><br />
<h3 class="wp-tab-title">Tabs and accordion</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"></p>
<h3 id="tabs-and-accordion">Tabs and accordion</h3>
<table>
<caption><strong>[<span>wptabtitle</span>]</strong></caption>
<thead>
<tr>
<th>Arguments</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>load</td>
<td>URL to the page your want to load through AJAX.</td>
</tr>
<tr>
<td>post</td>
<td>ID of the post you want to load into the tab</td>
</tr>
<tr>
<td>page</td>
<td>ID or name of the page you want to load into the tab.</td>
</tr>
<tr>
<td>page</td>
<td>ID or name of the page you want to load into the tab.</td>
</tr>
<tr>
<td>cat</td>
<td>ID or name of the category to load posts from.</td>
</tr>
<tr>
<td>tag</td>
<td>Name or ID of the Tag to load posts from.</td>
</tr>
<tr>
<td>number</td>
<td>Number of posts to load from the category or tag, if given.</td>
</tr>
<tr>
<td>before_post</td>
<td>This appears before the post</td>
</tr>
<tr>
<td>after_post</td>
<td>This appears after the post</td>
</tr>
</tbody>
</table>
<table>
<caption><strong>[<span>wptabcontent</span>]</strong></caption>
<thead>
<tr>
<th>Arguments</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
		<!-- wptabcontent shortcode --></p>
<td>none yet</td>
<td>wptabcontent shortcode handles the tab&#8217;s contents should follow [<span>wptabtitle</span>] shortcode, <em>except when the latter is used with post related arguments</em>, <code>post</code>, <code>page</code>, <code>cat</code>, <code>tag</code>.</td>
</tr>
</tbody>
</table>
<table>
<caption><strong>[<span>wptabs</span>]</strong></caption>
<thead>
<tr>
<th>Arguments</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>Tabs or accordion. Choose type=&#8221;accordion&#8221;.</td>
</tr>
<tr>
<td>style</td>
<td>Any of the accepted stylename values, given just below the table.<br /><code>[<span>wptabs style="wpui-achu"</span>]</code></td>
</tr>
<tr>
<td>mode</td>
<td>Define mode=&#8221;vertical&#8221; for vertically oriented tabs.</td>
</tr>
<tr>
<td>effect</td>
<td>Effect to be used with the tabs. Accepted values are &#8220;fade&#8221; or &#8220;slide&#8221;. <br /><code>[<span>wptabs effect="fade"</span>]</code></td>
</tr>
<tr>
<td>style</td>
<td>Any of the accepted stylename values, given just below the table.<br /><code>[<span>wptabs style="wpui-achu"</span>]</code></td>
</tr>
<tr>
<td>style</td>
<td>Any of the accepted stylename values, given just below the table.<br /><code>[<span>wptabs style="wpui-achu"</span>]</code></td>
</tr>
<tr>
<td>rotate</td>
<td>Tabs auto rotation. It&#8217;s value need to be in microseconds eg:4000 or 4s ( 4 seconds ). <br /><code> [<span>wptabs rotate="6000"</span>] </code> is same as <br /> <code> [<span>wptabs rotate="6s"</span>]  </code></td>
</tr>
<tr>
<td>Position</td>
<td>Position of the tabs. <code>position="bottom"</code> moves the tabs to the bottom</td>
</tr>
</tbody>
</table>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Tab posts</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
<table border="0">
<caption><strong>[<span>wptabposts</span>]</strong> Tabs with multiple posts.</caption>
<thead>
<tr>
<th>Arguments</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>All arguments</td>
<td>This shortcode is basically the <code>[<span>wptabs</span>]</code> shortcode, so all the options apply.</td>
</tr>
</tbody>
</table>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Spoilers</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
<table border="0">
<caption><strong>[<span>wpspoiler</span>]</strong> Spoilers (single) | Collapsible (multiple) </caption>
<thead>
<tr>
<th>Arguments</th>
<th>values</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Name/Title of the spoiler.  </td>
</tr>
<tr>
<td>style</td>
<td>Any of the accepted stylename values, given just below.<br /><code>[<span>wptabs style="wpui-achu"</span>]</code></td>
</tr>
<tr>
<td>fade</td>
<td>Fade(animate opacity) on open/close. <br /><code>[<span>wpspoiler fade="true"</span>]</code></td>
</tr>
<tr>
<td>slide</td>
<td>Slide on open/close. <br /><code>[<span>wpspoiler fade="true"</span>]</code></td>
</tr>
<tr>
<td>speed</td>
<td>Animation speed in milliseconds. Greater the value, slower the animation.</td>
</tr>
<tr>
<td>closebtn</td>
<td>Inserts a close button at end of the spoiler, with value as the label.<br /> <code> [<span>wpspoiler closebtn="Click to close me"</span>]</code> </td>
</tr>
<tr>
<td>showText</td>
<td>Text or HTML show on the closed spoiler i.e when content is hidden. <br /> <code> [<span>wpspoiler showText="Click to show"</span>] </code></td>
</tr>
<tr>
<td>hideText</td>
<td>Text or HTML show on the open spoiler i.e when content is visible. <br /> <code> [<span>wpspoiler hideText="Click to hide"</span>] </code></td>
</tr>
<tr>
<td>open</td>
<td>When this is set to true, Spoiler is open ( the content is visible ) at page load.</code></td>
</tr>
<tr>
<td>post</td>
<td>ID of the post. This is loaded into the spoiler. When a post is specified, the post title is used as the name Argument. <br /> <code> [<span>wpspoiler post="1171"</span>] </code></td>
</tr>
<tr>
<td>before_post</td>
<td>This appears before the post</td>
</tr>
<tr>
<td>after_post</td>
<td>This appears after the post</td>
</tr>
</tbody>
</table>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Dialogs</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
<table border="0">
<caption><strong>[<span>wpdialog</span>]</strong> Dialogs</caption>
<thead>
<tr>
<th>Arguments</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>Title of the dialog.<code>[<span>wpdialog title="Information regarding Unicorns"</span>]</code></td>
</tr>
<tr>
<td>width</td>
<td>Width of the dialog, <b>without the suffixing px value</b>. <br /> <code>[<span>wpdialog width="600"</span>] </code></td>
</tr>
<tr>
<td>show</td>
<td>Open animation. <br /> <code> [<span>wpdialog show="drop"</span>]</code></td>
</tr>
<tr>
<td>hide</td>
<td>Animation when dialog is closed. <br /> <code> [<span>wpdialog hide="explode"</span>] </code> <a href="http://docs.jquery.com/UI/Effects">Click here for the values</a>.</td>
</tr>
<tr>
<td>modal</td>
<td> <code> [<span>wpdialog modal="true"</span>]</code> makes an black transparent overlay appear.</td>
</tr>
<tr>
<td>auto_open</td>
<td>When set to <code>false</code>, dialog is not opened at page load. Instead a button is placed that can be clicked at any time to open the dialog.</td>
</tr>
<tr>
<td>openlabel</td>
<td>Can only be used with the above option, <code>auto_open</code>. Defines the label of the button.</td>
<tr>
<td>position</td>
<td>Position of the dialog. <br /> <code> [<span>wpdialog position="bottom"</span>]</code>. Accepted values <code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code></td>
</tr>
<tr>
<td>post</td>
<td>ID of the post that is to be loaded into the dialog. <br /> <code> [<span>wpdialog post="1175"</span>]</code></td>
</tr>
<tr>
<td>openlabel</td>
<td>Can only be used with the above option, <code>auto_open</code>. Defines the label of the button.</td>
<tr>
<td>before_post</td>
<td>This appears before the post</td>
</tr>
<tr>
<td>after_post</td>
<td>This appears after the post</td>
</tr>
</tbody>
</table>
<p></div></div><!-- end div.wp-tab-content --><br />
</div><!-- end div.wp-tabs --><br />
</div>  </div><!-- end div.wp-spoiler -->
<h4 id="sample-shortcode-structures">Sample shortcode structures</h4>
<div id="wp-tabs-2" class="wp-tabs wpui-quark wpui-styles"><br />
<h3 class="wp-tab-title">Tabs</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper">Below is the basic example on tab's structure. As we can see, wptabtitle is used to define the tab's name, wptabcontent holds the content and both are repeated as necessary. This is finally wrapped within wptabs shortcode.</p>
<pre class="minimal">
[<span>wptabs]
  [<span>wptabtitle] Tab 1[<span>/wptabtitle</span>]
    [<span>wptabcontent</span>] This is the content of Tab1.[<span>/wptabcontent</span>] 
  [<span>wptabtitle</span>] Tab 2 [<span>/wptabtitle</span>]
    [<span>wptabcontent</span>] This is the content of Tab2[<span>/wptabcontent</span>]
[<span>/wptabs</span>] </span></span></pre>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Accordion</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
So, accordions use the same shortcode [<span>wptabs</span>]. The required argument for an accordion is <code class="minimal">type="accordion"</code>, as mentioned earlier. Some tab specific arguments - <code class="minimal">rotate</code>, <code class="minimal">effect</code>, <code class="minimal">position</code> have no effect on the accordions. </p>
<pre class="minimal">
[<span>wptabs <strong>type="accordion"</strong>]
  [<span>wptabtitle] Tab 1[<span>/wptabtitle</span>]
    [<span>wptabcontent</span>] This is the content of Tab1.[<span>/wptabcontent</span>] 
  [<span>wptabtitle</span>] Tab 2 [<span>/wptabtitle</span>]
    [<span>wptabcontent</span>] This is the content of Tab2[<span>/wptabcontent</span>]
[<span>/wptabs</span>] </span></span></pre>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Dialog</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
Dialogs are initiated with the shortcode <code class="minimal">[<span>wpdialog</span>]</code>. Refer to the previous tabs for the list of arguments and values.</p>
<pre class="minimal">
<strong>[<span>wpdialog title="Confirm this action" show="drop" hide="explode" </span>]</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <strong>[/<span>wpdialog</span>]</strong>
</pre>
<p></div></div><!-- end div.wp-tab-content --><br />
<h3 class="wp-tab-title">Collapsibles</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper"><br />
Collapsibles aka sliders aka spoilers hide the content, that can be shown when user wants to click upon. It is implemented with <code class="minimal">[<span>wpspoilers</span>]</code> shortcode. These when used in a row, can provide functionality parallel to accordions, notable difference being that multiple panels can be open at a time.</p>
<pre class="minimal">
<strong>[<span>wpspoiler name="Spoilers" showText="click to show" hideText="" </span>] </strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <strong>[/<span>wpspoiler</span>]</strong>
</pre>
<p></div></div><!-- end div.wp-tab-content --><br />
</div><!-- end div.wp-tabs -->
<h3 id="list-of-styles">List of styles</h3>
<p>List of styles that can be used with the widgets are below</p>
<p><strong>WP UI custom styles</strong></p>
<ol>
<li>wpui-light
<li>wpui-red
<li>wpui-blue
<li>wpui-green
<li>wpui-dark
<li>wpui-quark
<li>wpui-cyaat9
<li>wpui-android
<li>wpui-safle
<li>wpui-alma
<li>wpui-macish
<li>wpui-achu
<li>wpui-redmond
<li>wpui-sevin </li>
</ol>
<p><strong>jQuery UI themes</strong></p>
<ol>
<li>ui-lightness</li>
<li>ui-darkness</li>
<li>smoothness</li>
<li>start</li>
<li>redmond</li>
<li>sunny</li>
<li>overcast</li>
<li>le-frog</li>
<li>flick</li>
<li>pepper-grinder</li>
<li>eggplant</li>
<li>dark-hive</li>
<li>cupertino</li>
<li>south-street</li>
<li>blitzer</li>
<li>humanity</li>
<li>hot-sneaks</li>
<li>excite-bike</li>
<li>vader</li>
<li>dot-luv</li>
<li>mint-choc</li>
<li>black-tie</li>
<li>trontastic</li>
<li>swanky-purse</li>
<li>base</li>
<li>black-tie</li>
</ol>
<p>Plus, <a href="http://kav.in/wp-ui-using-jquery-ui-custom-themes">Custom themes downloaded from jQuery UI themeroller</a>.</p>
<p>You can use the styles with any of the included wp-ui widgets, for ex.</p>
<p>Using a custom style, these are prefixed with <code>wpui-</code></p>
<pre class="minimal">
[<span>wptabs style="wpui-dark"</span>]
</pre>
<p>Using a jQuery UI theme is basically the same. For example,</p>
<pre class="minimal">
[<span>wpspoiler style="pepper-grinder"</span>]
</pre>
<h3 id="some-examples">Some examples</h3>
<div id="wpui-encloser-1">
<p><strong><em>Example 1</em></strong></p>
<p>Now something with lot of content.</p>
<div id="wp-tabs-3" class="wp-tabs wpui-light wpui-styles"><br />
<h3 class="wp-tab-title">Writing</h3><br />
<div class="wp-tab-content"><div class="wp-tab-content-wrapper">
<div style="width: 280px; float: right" class="wp-caption"><img alt="" src="http://192.168.1.105/wp/wp-content/uploads/2011/07/800px-Children_reading_The_Grinch.jpg" width="270"> </p>
<p class="wp-caption-text">Children Reading... Image by <a href="http://kav.in/demo/ex3.jpg" rel="nofollow">scbailey</a></p>
</div>
<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, "Oh, why can't you remain like this for ever!" This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end. Mrs. Darling first heard of Peter when she was tidying up her children's minds. It is the nightly custom of every good mother after her children are asleep to rummage in their minds and put things straight for next morning, repacking into their proper places the many articles that have wandered during the day. If you could keep awake (but of course you can't) you would see your own mother doing this, and you would find it very interesting to watch her. It is quite like tidying up drawers. You would see her on her knees, I expect, lingering humorously over some of your contents, wondering where on earth you had picked this thing up, making discoveries sweet and not so sweet, pressing this to her cheek as if it were as nice as a kitten, and hurriedly stowing that out of sight</div></div><!-- end div.wp-tab-content --> <h3 class="wp-tab-title">Quotes</h3> <div class="wp-tab-content"><div class="wp-tab-content-wrapper">Some block quote tests:</p>
<blockquote>
<p>Here's a one line quote.</p>
</blockquote>
<p>This part isn't quoted. Here's a much longer quote:</p>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In dapibus. In pretium pede. Donec molestie facilisis ante. Ut a turpis ut ipsum pellentesque tincidunt. Morbi blandit sapien in mauris. Nulla lectus lorem, varius aliquet, auctor vitae, bibendum et, nisl. Fusce pulvinar, risus non euismod varius, ante tortor facilisis lorem, non condimentum diam nisl vel lectus. Nullam vulputate, urna rutrum vulputate molestie, sapien dolor adipiscing nisi, eu malesuada ipsum lectus quis est. Nulla facilisi. Mauris a diam in eros pretium elementum. Vivamus lacinia nisl non orci. Duis ut dolor. Sed sollicitudin cursus libero. Proin et lorem. Quisque odio. Ut gravida, pede sed convallis facilisis, magna dolor egestas dolor, non pulvinar metus magna in velit. Morbi vitae sem sit amet arcu vehicula gravida. Morbi placerat, est id pulvinar sollicitudin, ante augue vestibulum turpis, eu ultrices pede metus sit amet justo. Suspendisse metus. Mauris convallis mattis risus. Nullam et ipsum eu magna hendrerit pellentesque. Ut malesuada turpis nec orci. Donec at urna imperdiet libero tincidunt lacinia. Phasellus mollis leo pharetra velit. Quisque tortor. Nam pharetra est vel felis. Maecenas tincidunt, purus ac ultrices vehicula, ante magna ultrices orci, ac malesuada lectus purus sit amet odio. Vivamus id libero. Vivamus enim nisi, egestas aliquam, tincidunt malesuada, semper at, turpis. Vestibulum risus dolor, placerat quis, adipiscing sed, scelerisque a, enim. Vestibulum posuere. Mauris felis. Vivamus ornare. Maecenas mi. Mauris quis nunc. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse potenti. In at lorem. Aliquam sed ligula eu erat ultrices congue. Aenean interdum semper purus. Phasellus eget lorem.</p>
</blockquote>
<p>And some trailing text.</div></div><!-- end div.wp-tab-content --> <h3 class="wp-tab-title">Tables</h3> <div class="wp-tab-content"><div class="wp-tab-content-wrapper"></p>
<h2 class="heading-within-tabs">Table Layout Test</h2>
<table width="100%">
<tbody>
<tr>
<th style="border-bottom-style: none !important; border-left-style: none !important; border-top-style: none !important; border-right-style: none !important">Title</th>
<th style="border-bottom-style: none !important; border-left-style: none !important; border-top-style: none !important; border-right-style: none !important">Views</th>
<th style="border-bottom-style: none !important; border-left-style: none !important; border-top-style: none !important; border-right-style: none !important"></th>
</tr>
<tr>
<td><a href="http://wpthemetestdata.wordpress.com/about/">About Test User</a></td>
<td>1</td>
<td>More</td>
</tr>
<tr>
<td><a href="http://wpthemetestdata.wordpress.com/">260</a></td>
<td>1</td>
<td>More</td>
</tr>
<tr>
<td><a href="http://wpthemetestdata.wordpress.com/archives/">Archives</a></td>
<td>1</td>
<td>More</td>
</tr>
<tr>
<td><a href="http://wpthemetestdata.wordpress.com/">235</a></td>
<td>1</td>
<td>More</td>
</tr>
</tbody>
</table>
<p></div></div><!-- end div.wp-tab-content --> <h3 class="wp-tab-title">Align</h3> <div class="wp-tab-content"><div class="wp-tab-content-wrapper"></p>
<h3 id="left-align-no-caption">Left-align, no caption</h3>
<p>Left-aligned image with no caption, and text before and after. <img style="margin: 10px" title="test-image-landscape" alt="" align="left" src="http://wpthemetestdata.files.wordpress.com/2008/09/test-image-landscape.jpg" width="300" height="199"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.</p>
<h3 id="right-align-no-caption">Right-align, no caption</h3>
<p>Right-aligned image with no caption, and text before and after. <img style="margin: 10px" title="test-image-landscape" alt="" align="right" src="http://wpthemetestdata.files.wordpress.com/2008/09/test-image-landscape.jpg" width="300" height="199">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula. </div></div><!-- end div.wp-tab-content --></div><!-- end div.wp-tabs -->
<p>you see how the content behaves inside the tabs? If you have something looking wrong, you can bundle additional CSS through the plugin's option page.</p>
</div>
<p>Example 2 : Media</p>
<div id="wp-tabs-4" class="wp-tabs wpui-quark wpui-styles"><br /><h3 class="wp-tab-title">Vimeo</h3><br /><div class="wp-tab-content"><div class="wp-tab-content-wrapper">     <iframe src="http://player.vimeo.com/video/25475500" width="540" height="304" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> </div></div><!-- end div.wp-tab-content --><br /><h3 class="wp-tab-title">wordpress tv</h3><br /><div class="wp-tab-content"><div class="wp-tab-content-wrapper"><embed src="http://v.wordpress.com/ac07H291" type="application/x-shockwave-flash" width="540" height="303" allowscriptaccess="always" allowfullscreen="true" wmode="transparent"></embed> </div></div><!-- end div.wp-tab-content --><br /><h3 class="wp-tab-title">Youtube</h3><br /><div class="wp-tab-content"><div class="wp-tab-content-wrapper"><iframe width="540" height="304" src="http://www.youtube.com/embed/VuNIsY6JdUw?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></div></div><!-- end div.wp-tab-content --> </div><!-- end div.wp-tabs -->
<p>For embedding Videos, you may need to enclose the videos within [<span>embed width="460px"</span>][<span>/embed</span>] shortcodes, If the video exceeds the tab's width, please pass the width argument to the embed shortcode.</p>
<ul></ul>
<h2 id="wpui_demo">Demo</h2>
<p>Above examples does not do any justice to this plugin's capabilities. Check out all the examples with the code involved below.</p>
<p>Demo : <a href="http://kav.in/projects/blog/wp-ui-tabs-accordion-sliders-demo/" target="_blank">Components</a> | <a href="http://kav.in/projects/blog/wp-ui-tabs-accordion-sliders-demo/" target="_blank">CSS3 styles</a></p>
<p>&nbsp;</p>
<h2 id="download_wpui">Download</h2>
<div class="cap-download-badge">
<div class="cap-download-image"><a title="WP UI for WordPress" href="http://wordpress.org/extend/plugins/wp-ui/"><img src="http://kav.in/downloads/cap-download-icon.png"></a></div>
<div class="cap-download-details"><a title="WP UI for WordPress" href="http://wordpress.org/extend/plugins/wp-ui/">Download WP UI for WordPress</a><br /><span class="cap-download-meta">By kavin | Latest </span></div>
</div>
<hr />
<h3 id="changelog">Changelog</h3>
<blockquote>
<p id="changes_save">All versions</p>
<p>Each version of WP UI brings you additional features. Most of these are customizable through the options page. Due to this fact, it might be necessary to re-save the options after each update.</p>
</blockquote>
<p><a href="http://wordpress.org/extend/plugins/wp-ui/changelog/">View the WP UI changelog</a></p>
<h3 id="documentation">Documentation</h3>
<p>You can find the documentation on WP UI at <a href="http://kav.in/projects/">projects site</a>. </p>
<p>Thanks to <a href="http://sorendayton.com/">Soren Dayton</a> for his suggestions on the posts feature that then became available from version 0.7. </p>
<h3 id="help-and-support">Help and support</h3>
<p>Most of the issues can be corrected by verifying the shortcode syntax.</p>
<blockquote><p>
Do enter different shortcodes in separate lines, but avoid the empty lines in between. If you want to enter the shortcodes in the same line, give at least two spaces before the next shortcode.
</p></blockquote>
<p><a href="http://kav.in/forum">Get help and support</a></p>
<hr />
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Cheerio,</p>
<p>kavin</p>
<p><script type="text/javascript">
jQuery(document).ready(function() {
	var i = 0;
	classList = new Array;
	classList[i++] = 'wpui-light';
	classList[i++] = 'wpui-blue';
	classList[i++] = 'wpui-red';
	classList[i++] = 'wpui-green';
	classList[i++] = 'wpui-dark';
	classList[i++] = 'wpui-achu';
	classList[i++] = 'wpui-quark';
	classList[i++] = 'wpui-cyaat9';
	classList[i++] = 'wpui-redmond';
	classList[i++] = 'wpui-sevin';
	classList[i++] = 'wpui-alma';
	classList[i++] = 'wpui-macish';
	classList[i++] = 'wpui-android';
	classList[i++] = 'wpui-safle';	
	jQuery('div#wpui-encloser-1').tabsThemeSwitcher( classList );
});
</script></p>
<p>&nbsp;</p>
<style type="text/css">
.single div.default-thumbnail { display: none !important }
div.selector_tab_style { -moz-border-radius: 2px; border-radius: 2px; -webkit-border-radius: 2px; -o-border-radius: 2px; background: #f4f2f4; border: 1px solid #aaa; padding: 10px; text-align: center; -moz-box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #fff inset, 0 2px 4px #cdcdcd; -webkit-box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #fff inset, 0 2px 4px #cdcdcd;  -o-box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #fff inset, 0 2px 4px #cdcdcd; box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #fff inset, 0 2px 4px #cdcdcd; } 
table.minimal th,
table.minimal td, table.minimal caption { border: 0px !important; border-bottom: 1px solid #888;}
</style>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=30SOR0ARWvY:iOLvKpMdQcc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=30SOR0ARWvY:iOLvKpMdQcc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=30SOR0ARWvY:iOLvKpMdQcc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=30SOR0ARWvY:iOLvKpMdQcc:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=30SOR0ARWvY:iOLvKpMdQcc:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/30SOR0ARWvY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wp-ui-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>343</slash:comments>
		<feedburner:origLink>http://kav.in/wp-ui-for-wordpress/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wp-ui-for-wordpress</feedburner:origLink></item>
		<item>
		<title>When your wordpress post content goes missing!</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/YcnMON_BGx8/</link>
		<comments>http://kav.in/wordpress-post-content-missing/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 10:40:29 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[Wordpress themes]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[post content]]></category>
		<category><![CDATA[twentyten]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://kav.in/wordpress-post-content-missing</guid>
		<description><![CDATA[After two straight days of procrastination and leisure, today I woke and fired up my local server, only to find that all my test posts being weird and empty. Content of all posts had mysteriously disappeared.   Oh no.. not again. As you can see Above image, the post content is missing, while all the [...]]]></description>
			<content:encoded><![CDATA[<p>After two straight days of procrastination and leisure, today I woke and fired up my <a title="Learn how to install Local PHP/MySQL server in your PC or Mac!" href="http://kav.in/tag/local-server" target="_blank">local server</a>, only to find that all my test posts being weird and empty. Content of all posts had mysteriously disappeared.</p>
<p><span id="more-952"></span></p>
<div class="wp-caption" style="width: 382px; height: 320px;">  <a class="thickbox" href="http://kav.in/blog/wp-content/uploads/2011/07/post-content-missing-1.png"><img style="background-image: none; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="post-content-missing-1" src="http://kav.in/blog/wp-content/uploads/2011/07/post-content-missing-1_thumb.png" alt="post-content-missing-1" width="350" height="244" border="0" /></a></p>
<p class="wp-caption-text">Oh no.. not again.</p>
</div>
<p>As you can see Above image, the post content is missing, while all the other -Title, meta output just fine. And this really seemed worth playing with.</p>
<h3 id="causes">Causes</h3>
<p>Most common &#8211; Some vaguely written function hooking into the <span class="spancode">the_content</span> filter. Also note,</p>
<ul>
<li>Output of <span class="spancode"><span class="spancode">the_excerpt</span></span>was ok.</li>
<li>Problem appeared in all the themes, including the wp3.0 default twentyten, so problem is probably not related to a theme.</li>
</ul>
<h3 id="debugging">Debugging</h3>
<p><strong>Deactivating plugins</strong> one by one is the most widely suggested solution in the interwebs. Well, you can always try that out. But I didn&#8217;t want to disable/enable plugins one by one. First, it takes too much time, is boring and I always forget to enable a plugin or two and scratch my head for hours why something isn&#8217;t working.</p>
<p>As we know, wordpress hook/function <span class="spancode">the_content</span> outputs the post&#8217;s content. Filters are attached to it, few from the core and some from the plugins.</p>
<p>1. Lets check if the content is fine. The function get_the_content(),  outputs the unfiltered content. I inserted <span class="spancode">echo get_the_content</span> into 2010&#8242;s loop-single.php</p>
<div class="wp-caption" style="width: 364px; height: 218px;"><a class="thickbox" href="http://kav.in/blog/wp-content/uploads/2011/07/get_the_content.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="get_the_content" src="http://kav.in/blog/wp-content/uploads/2011/07/get_the_content_thumb.png" alt="get_the_content" width="350" height="178" border="0" /></a></p>
<p class="wp-caption-text">Output the unmodified content with get_the_content()</p>
</div>
<p>And the result.</p>
<div class="wp-caption" style="width: 365px; height: 274px;"><a class="thickbox" href="http://kav.in/blog/wp-content/uploads/2011/07/get_the_output.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="get_the_output" src="http://kav.in/blog/wp-content/uploads/2011/07/get_the_output_thumb.png" alt="get_the_output" width="350" height="238" border="0" /></a></p>
<p class="wp-caption-text">Content appears ok!</p>
</div>
<h3 id="fixing">Fixing</h3>
<p>Well, something is messing with <span class="spancode">the_content()</span> hook here. To trace the culprit, I decided to use one fantastic snippet written by <a title="Rarst : Debug wordpress hooks." href="http://www.rarst.net/script/debug-wordpress-hooks/" target="_blank">Rarst</a>, that outputs the list of all hooks and respective filters attached to them.</p>
<div id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:3945a554-16bd-4903-a936-144f9084efe2" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: php;">function list_hooked_functions($tag=false){
	global $wp_filter;
	if ($tag) {
		$hook[$tag]=$wp_filter[$tag];
		if (!is_array($hook[$tag])) {
			trigger_error("Nothing found for '$tag' hook", E_USER_WARNING);
			return;
		}
	} else {
		$hook=$wp_filter;
		ksort($hook);
	}
	echo '&lt;pre&gt;';
	foreach($hook as $tag =&gt; $priority) {
		echo "&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;\t&lt;strong&gt;$tag&lt;/strong&gt;&lt;br /&gt;";
		ksort($priority);
		foreach($priority as $priority =&gt; $function){
			echo $priority;
			foreach($function as $name =&gt; $properties) echo "\t$name&lt;br /&gt;";
		}
	}
	echo '&lt;/pre&gt;';
	return;
} // END function list_hooked_functions.
 echo '&lt;/pre&gt;';
 return;
}

 echo '&lt;/pre&gt;';
 return;
}</pre>
</div>
<p>Running the above function without the argument(here the hook name) lists all the hooks with functions. In our case, specific problem is with <span class="spancode">the_content</span> hook, So let&#8217;s try the below.</p>
<div id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2314b1e4-03f2-4e62-99b7-45b5900311f0" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: php;">&lt;?php
	// the_content is our hook.
	list_hooked_functions( 'the_content' );
?&gt;</pre>
</div>
<p>Let&#8217;s see the result now. Ha!</p>
<div class="wp-caption" style="width: 597px; height: 481px;"><a href="http://kav.in/blog/wp-content/uploads/2011/07/gotcha_the_content1.png"><img style="background-image: none; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="gotcha_the_content" src="http://kav.in/blog/wp-content/uploads/2011/07/gotcha_the_content_thumb1.png" alt="gotcha_the_content" width="580" height="425" border="0" /></a></p>
<p class="wp-caption-text">the_content hook and functions hooked.</p>
</div>
<p>So I found that a function I started and forgot to finish &#8211; <span class="spancode">clean_pre_shjs()</span> was the reason behind this. I rewrote the function and now the content appears ok!</p>
<p>Let&#8217;s summarize the causes of my problem(pun intended).</p>
<p><img class="wp-post-image" src="http://chart.apis.google.com/chart?chf=a,s,000000|bg,lg,6.667,C9D0DE,0,EBF1F9,1&amp;chxs=0,224499,11.5&amp;chxt=x&amp;chs=580x200&amp;cht=p3&amp;chco=3399CC,BBCCED,76A4FB&amp;chd=s:uPC&amp;chp=0.4&amp;chl=Vague/+Unfinished+functions|Forgetting+to+enter+content.|Caffeine+deprivation&amp;chtt=Reasons+for+missing+post+content+in+WordPress" alt="Reasons for missing post content in WordPress" width="580" height="200" /></p>
<h3 id="further">Further</h3>
<p>The article just points you out how much smart and interesting debugging can be. Try this function on any wordpress hook, core or yours own.</p>
<p>Rarst, who wrote the above snippet went further and has a new set of <a title="Wordpress hooks debugging : Rarst" href="http://www.rarst.net/script/debug-wordpress-hooks/" target="_blank">hook debug functions here</a>. Please take a look at them.</p>
<p>+ Kavin.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=YcnMON_BGx8:YEOFmvO0AvM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=YcnMON_BGx8:YEOFmvO0AvM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=YcnMON_BGx8:YEOFmvO0AvM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=YcnMON_BGx8:YEOFmvO0AvM:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=YcnMON_BGx8:YEOFmvO0AvM:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/YcnMON_BGx8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wordpress-post-content-missing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://kav.in/wordpress-post-content-missing/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-post-content-missing</feedburner:origLink></item>
		<item>
		<title>WordPress twenty ten Child theme – DIY tutorial</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/W-DAnyBPexo/</link>
		<comments>http://kav.in/wordpress-child-theme-twenty-ten-diy/#comments</comments>
		<pubDate>Fri, 27 May 2011 21:50:58 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress themes]]></category>
		<category><![CDATA[ashten]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[parent theme]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[twentyten]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress development]]></category>
		<category><![CDATA[wordpress themes]]></category>

		<guid isPermaLink="false">http://kav.in/wordpress-child-theme-twenty-ten-diy</guid>
		<description><![CDATA[Every WordPress blogger out there might definitely agree that no theme out of the box absolutely fits his/her personal preferences. A well created child theme can inherit the robustness and bring uniqueness to your blog. Recently I made a twenty ten child theme for my friend-cum-client which he warmly approved, and then he asked, &#8220;How [...]]]></description>
			<content:encoded><![CDATA[<p>Every WordPress blogger out there might definitely agree that no theme out of the box absolutely fits his/her personal preferences. A well created child theme can inherit the robustness and bring uniqueness to your blog. Recently I made a twenty ten child theme for my friend-cum-client which he warmly approved, and then he asked, &#8220;How do I add a post slider?&#8221;. I thought an article about child theme should not end with creating one, but by adding more features and bringing it out unique.</p>
<p><span id="more-935"></span>
<p>I used the twenty ten theme as the parent theme for multiple reasons, two below.</p>
<p>1. Semantic HTML5-compatible markup.</p>
<p>2. Default theme, so virtually in every wordpress installation.</p>
<hr />
<h2 id="why-a-child-theme">Why a child theme</h2>
<ul>
<li><em>Easiness</em> &#8211; new style.css file is the only requirement for the child theme. </li>
<li><em>Maintenance</em> &#8211; Child theme is safe from parent theme&#8217;s update process.
<li><em>Customization</em> – Change the parent theme’s code without touching it. If theme offers multiple hooks, the process is even simpler. </li>
</ul>
<p class="notify-reader">Entire guide assumes that you have a local server installed on your computer. This is the safest, fastest, and easiest and portable way to work with. If you don’t have one, know how to install in <a title="Install a Local server on your Windows PC using XAMPP" href="http://kav.in/how-to-install-portable-local-server-on-your-windows-pc-using-xampp" target="_blank">PC</a> or <a title="Install a local server on your mac with MAMP" href="http://kav.in/installing-a-portable-local-server-in-your-mac-using-mamp" target="_blank">Mac</a> .</p>
<h2 id="tools">Tools</h2>
<ol>
<li>Any basic text editor would do, Professional editors like Textmate/BBEdit (Mac) and Notepad++(windows) would accelerate the process.
<li>Some reasonable HTML, CSS language skills. And some knowledge on PHP.
<li>A latest browser. &#8211; <a title="Get Firefox 4" href="http://www.mozilla.com/en-US/products/download.html" target="_blank">Firefox</a> or <a href="http://google.com/chrome" target="_blank">Chrome</a>.
<li>Debugging tools &#8211; These can be extremely helpful on fixing annoying errors. Get one for your browser.
<ul>
<ul>
<li><a title="Edit, debug, and monitor CSS, HTML, and JavaScript live in any web page" href="http://getfirebug.com" target="_blank">Firebug</a> for firefox.
<li>Chrome comes with built in Console. Right click anywhere and select <em>inspect element</em>.
<li>Safari, Enable developer tools from advanced preferences.
<li>Dragonfly , if you swear by Opera. Right click anywhere and select <em>inspect element</em>.
<li>Internet explorer? It is the best browser for downloading one of the better browsers listed above. No? okay, get IE9 and click F12 .</li>
</ul>
</ul>
</li>
</ol>
<h2 id="magic-of-style-css">Magic of Style.css</h2>
<p>Let&#8217;s choose a name for the child theme. For e.g. I chose <em>Ashten</em>.</p>
<p>Browse to your wordpress themes folder(it&#8217;s in /path/to/wordpress/wp-content/themes/). Locate the folder twentyten. Now, create a parallel folder with the name we chose.</p>
<div style="width: 600px" class="wp-caption aligncenter"><a href="http://kav.in/blog/wp-content/uploads/2011/05/1_childtheme_stylesheet.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1#childtheme_stylesheet" border="0" alt="1#childtheme_stylesheet" src="http://kav.in/blog/wp-content/uploads/2011/05/1_childtheme_stylesheet_thumb.png" width="584" height="347"></a>
<p class="wp-caption-text">Create the child theme folder</p>
</div>
<p><!-- end caption --></p>
<p>Create a file <em>style.css</em>,&nbsp; that will be our child theme’s main style sheet.</p>
<p>Now copy the code below to the above file. This is the file header, enclosed within comments, located at start, that wordpress acquires theme details. Two important fields would be Child theme&#8217;s name( any valid name, except twentyten) and parent theme(template)&#8217;s name. Please refer with the image below.</p>
<pre class="brush:php">/*
Theme Name: Ashten
Theme URI: http://kav.in/
Description: Dashy twenty ten.
Author: Kavin
Author URI: http://kav.in
Template: twentyten
Version: 0.1
*/</pre>
<div style="width: 600px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/3_stylesheet_info.gif"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="3#stylesheet_info" border="0" alt="3#stylesheet_info" src="http://kav.in/blog/wp-content/uploads/2011/05/3_stylesheet_info_thumb.gif" width="584" height="420"></a>&nbsp;
<p class="wp-caption-text">Declaring the parent theme from child theme’s stylesheet</p>
</div>
<p>Replace the values to <span style="text-decoration: underline">Theme name</span>, <span style="text-decoration: underline">Theme URI</span>, <span style="text-decoration: underline">Author</span>, <span style="text-decoration: underline">Author URI</span> to your liking. Essential line here is the <span class="spancode">Template: twentyten</span>. WordPress, now will use twentyten’s files as the template. </p>
<p>Now proceed to the admin section of your blog. The new theme is shown as the option, like below. “Activate” the new theme.</p>
<div style="width: 600px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/2_activate_newtheme.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2#activate_newtheme" border="0" alt="2#activate_newtheme" src="http://kav.in/blog/wp-content/uploads/2011/05/2_activate_newtheme_thumb.png" width="580" height="830"></a> </p>
<p class="wp-caption-text">Activate our new theme! <em>Beginners, <u>take a look at the highlighted information</u> below the links.</em></p>
</div>
<p>Now reload the viewer facing side of your blog and take a look. An un-styled page appears. Why so? Because defining the parent theme auto-inherits only the code (functions, variables etc.) and <span style="text-decoration: underline">Not the styles</span>, unless explicitly imported. This is very useful, IMHO.</p>
<p>Now you’ve got two options. One, if you are fluent in CSS, you can start styling the theme from scratch. Second, start by importing the parent theme’s stylesheet and overriding theme’s styles there after. Let&#8217;s choose option 1, for now.</p>
<pre class="brush:css">/**
 *  "../" points to the directory above. “../twentyten”, a folder in
 *  the above directory.
 *  @import url - Import function of the CSS. Accepts path or
 *  URL. Be careful with the CaSE sensitivity though.
 */
@import url("../twentyten/style.css");

/**
 *  Let us make sure that child theme is being loaded.
 */
body {
	background: skyblue;
}</pre>
<p>Now reload the page. Child theme bears no difference to twenty ten, except for the background we modified, <span style="text-decoration: underline">skyblue</span>.</p>
<div style="width: 650px" class="wp-caption"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Google ChromeScreenSnapz004" border="0" alt="Google ChromeScreenSnapz004" src="http://kav.in/blog/wp-content/uploads/2011/05/Google-ChromeScreenSnapz004.png" width="625" height="484"> </p>
<p class="wp-caption-text">Our child theme, just like twenty ten, but with a skyblue background.</p>
</div>
<p><span style="color: #ff0000"></span></p>
<p>Now we shall proceed to next step.</p>
<h2 id="modifying-the-parent-theme’s-output-from-the-child-theme">Modifying the parent theme’s output from the child theme</h2>
<p>Child theme can modify the parent theme’s code <u>indirectly</u> by altering the <em>output.</em></p>
<p class="notify-reader">It always helps a beginning developer to study the code and the documentation if available. Almost everything else can be figured out with Google. Excellent manual on PHP can be found at <a title="PHP Developer's Manual" href="http://php.net" target="_blank">php.net</a>, WordPress documentation can be found at wordpress <a title="Wordpress Documentation : Codex" href="http://codex.wordpress.org" target="_blank">codex</a>.</p>
<p>Inside the child theme’s folder, create a file named “functions.php”. you can refer about functions.php at codex <a title="Wordpress Codex: Theme Development &gt;&gt; Functions.php" href="http://codex.wordpress.org/Theme_Development#Functions_File" target="_blank">here</a>.</p>
<p class="notify-reader">Open the twentyten’s files (as required and when noted) alongside, as that helps to understand the process better. We are not touching the parent theme, it&#8217;s for reference purposes only.</p>
<p>Modifying the code can be done with</p>
<ul>
<li><u>Hooks</u> – Filter and action hooks. (both have add_ and remove_ functions)
<li>Redeclaring the <u>over-writable functions</u> on Parent theme’s code.
<li><u>Alternative template files</u> on child theme&#8217;s folder. </li>
</ul>
<hr />
<h3><font style="font-weight: bold">Hooks</font></h3>
<p>WordPress offers two type of hooks – Action and filter. Action hooks are fired at specific points, or when an event occurs. Filters hooks – are used to modify input and output. Both type of hooks act similarly. Now, it’s time for some examples – way these are better understood.</p>
<h3 id="example---filtering-post-content">Example:. Filtering post content</h3>
<p>Say for example, we need to insert some text or image into the post. Each wordpress post&#8217;s content is output with <span class="spancode">the_content()</span> function/hook. Like most wordpress functions, <span class="spancode">the_content()</span> can be hooked and filtered.</p>
<p>Now let&#8217;s create a new function, which gets the input, and outputs the modified input. Then we attach the function to <span class="spancode">the_content()</span>&nbsp; .</p>
<p>Example , Add something above content.</p>
<p><em><u>code</u></em></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:ca48f20a-60c6-4325-81b8-5b2ba612ee33" class="wlWriterEditableSmartContent">
<pre class="brush: php;">// Insert something before the post.
add_filter( 'the_content', 'filter_content_before');

function filter_content_before( $input ) {
	// returns the output.
	// . is php concatenation operator.
	
	return "&lt;b&gt;Hello all&lt;/b&gt;, " . $input;
	
} // END function filter_content_before</pre>
</div>
<p><em><u>Result</u></em></p>
<div style="width: 650px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/filter_content_before.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="filter_content_before" border="0" alt="filter_content_before" src="http://kav.in/blog/wp-content/uploads/2011/05/filter_content_before_thumb.png" width="600" height="225"></a> </p>
<p class="wp-caption-text">Filtering: inserting before wordpress post content</p>
</div>
<p><u></u>&nbsp;</p>
<p><u>Example &#8211; Adding something below post content.</u></p>
<p><em><u>code</u></em></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6f731820-1c65-439f-b0a3-ecf095f3d930" class="wlWriterEditableSmartContent">
<pre class="brush: php;">
// Insert something after the post.
add_filter( 'the_content', 'filter_content_after', 11);

function filter_content_after( $input ) {
	
	return $input . "Regards,&lt;br /&gt;Yours admin!&lt;br /&gt;";
	
} // END function filter_content_after


// Insert something after the post, but before previous one.
add_filter( 'the_content', 'filter_content_right_after', 10);

function filter_content_right_after( $input ) {
	
	return $input . '&lt;hr style="background: skyblue; height: 4px;"&gt;';
	
} // END function filter_content_right_after.
</pre>
</div>
<p>Let&#8217;s take a look at the above code. By default, functions are hooked in the order they are added to the filter. </p>
<p>So far , <span class="spancode">filter_content_right_after()</span> appears after <span class="spancode">filter_content_after()</span> . Say, we want that to appear right after. Here comes the <u>hook priority</u>, the third argument to add_filter.</p>
<p align="center"><em>Lesser the number, Higher the priority. </em></p>
<p align="center"><em>Greater the number , lesser the priority. </em></p>
<p>So, function with priority number <span style="color: #ff0000">1</span> would be executed long <span style="color: #ff0000">before</span> function with priority number <span style="color: #ff0000">12</span>. That said, the <span class="spancode">filter_content_right_after()</span> &#8220;10&#8243; has a higher priority than <span class="spancode">filter_content_after()</span> &#8220;11&#8243;. Hook&#8217;s priority are similar to CSS rules priority, later ones have higher priority(Cascading). If both our functions had priority 10, then they are executed in the order of attachment.</p>
<p><em><u>Result</u></em></p>
<div style="width: 650px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/filter_content_after.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="filter_content_after" border="0" alt="filter_content_after" src="http://kav.in/blog/wp-content/uploads/2011/05/filter_content_after_thumb.png" width="620" height="240"></a> </p>
<p class="wp-caption-text">Filter : insert content after post content in wordpress</p>
</div>
<p>This is most commonly applied to show up Advertisements at the top or bottom of the posts. Want to add something at specific points in every post? Here&#8217;s how.</p>
<p>code</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:39ba0513-c48c-4549-b4b4-e898390b89c8" class="wlWriterEditableSmartContent">
<pre class="brush: php;">/**
 * 	Insert something into the post, for example ads.
 */
add_filter( 'the_content', 'insert_between_moi_posts' );

function insert_between_moi_posts( $content ) {
	// Insert this.
	$insert_this = '&lt;p&gt;&lt;a href="http://example.com"&gt;&lt;img src="' . get_bloginfo( 'template_url') .'/images/ad_banner.gif" /&gt; &lt;/a&gt;&lt;/p&gt;';
	
	// Insert in place of our placeholder &lt;!--ad-inserts--&gt;
	$content = preg_replace( '/&lt;!--ad-inserts--&gt;/im', $insert_this, $content);	
	
	// always return the content, post will be empty failing to do so.
	return $content;
}</pre>
</div>
<p>&nbsp;
<ul>
<li><span class="spancode">&lt;!&#8211;ad-inserts&#8211;&gt;</span> is our placeholder. It can also be {ad-inserts} , but using html comments is more safe. </li>
<li>The content, here an image, will replace the <span class="spancode">&lt;!&#8211;ad-inserts&#8211;&gt;</span> , wherever it occurs in posts. </li>
<li>we use php function preg_replace, which replaces our placeholder wherever it occurs inside posts. Learn more about <a class="spancode" title="preg_replace()" href="http://php.net/manual/en/function.preg-replace.php" target="_blank">preg_replace</a>.</li>
<li>Now edit any post in wordpress admin, go to HTML mode, insert &lt;!&#8211;ad-inserts&#8211;&gt; anywhere and view the post on the blog. Now it should be replaced with an image.</li>
</ul>
<p> Example below.</p>
<div style="width: 650px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/06/insert_ad_tut.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="insert_ad_tut" border="0" alt="insert_ad_tut" src="http://kav.in/blog/wp-content/uploads/2011/06/insert_ad_tut_thumb.jpg" width="604" height="544"></a>&nbsp;
<p class="wp-caption-text">Inserting custom content in between posts Above, the placeholder insert and below, the replacement image that appears.</p>
</div>
<p>&nbsp;<br />
<hr />
<h3><font style="font-weight: bold">Overriding functions</font></h3>
<p>Not every function can be over-ridden. Trying to redefine an already existing function with the same name will throw up an error – <span class="spancode">Fatal Error: Cannot re declare <em>function_name</em> (previously declared in line number..) </span>.&nbsp; </p>
<p>A Parent theme&#8217;s functions if enclosed within the&nbsp; <span class="spancode">if( ! function_exists )</span> php conditional, can be overridden. Take the below function from twentyten, which you can find in <span class="spancode">functions.php</span> inside twentyten folder. </p>
<pre class="brush:php, highlight: [1, 24]">if ( ! function_exists( 'twentyten_posted_in' ) ) {

function twentyten_posted_in() {
	// Retrieves tag list of current post, separated by commas.
	$tag_list = get_the_tag_list( '', ', ' );
	if ( $tag_list ) {
		$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a title="Permalink to %4$s" href="%3$s" rel="bookmark">permalink</a>.', 'twentyten' );
	} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
		$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a title="Permalink to %4$s" href="%3$s" rel="bookmark">permalink</a>.', 'twentyten' );
	} else {
		$posted_in = __( 'Bookmark the <a title="Permalink to %4$s" href="%3$s" rel="bookmark">permalink</a>.', 'twentyten' );
	}
	// Prints the string, replacing the placeholders.
	printf(
		$posted_in,
		get_the_category_list( ', ' ),
		$tag_list,
		get_permalink(),
		the_title_attribute( 'echo=0' )
	);

} // END function twentyten_posted_in.

} // END if !function_exists check.</pre>
<p>Above function is declared only, if no other function by the same name exists. This function is used to output the information about, and below the post on single view.</p>
<div style="width: 650px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/FirefoxScreenSnapz001.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="FirefoxScreenSnapz001" border="0" alt="FirefoxScreenSnapz001" src="http://kav.in/blog/wp-content/uploads/2011/05/FirefoxScreenSnapz001_thumb.png" width="600" height="172"></a> </p>
<p class="wp-caption-text">Default output of twentyten_post_in()</p>
</div>
<p>Now, let’s say, we would like to have the post meta information as a list rather than continuous lines. So let’s re-declare the function <span class="spancode">twentyten_posted_in</span>.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:9049e7c1-f606-4c6a-9a33-456b95bdbe5c" class="wlWriterEditableSmartContent">
<pre class="brush: php;">
function twentyten_posted_in() {
	
	// Prepare the links.
	$tag_link = get_the_tag_list('Tags: ',', ','');
	$cats_link = get_the_category_list( ' , ' );
	$author_link = '&lt;a href="'. get_author_posts_url( get_the_author_meta( 'ID' )) .'" title="View more posts by '. get_the_author() .'"&gt;'. get_the_author() . '&lt;/a&gt;';
	$edit_post_link = '&lt;a href="' . get_edit_post_link($post-&gt;ID) . '"&gt;' . __('Edit.', 'kavin') . '&lt;/a&gt;';
	
	
	$post_meta = '';
	// Enclosing div.
	$post_meta .= '&lt;div class="post-meta-foot"&gt;';

	// Avatar
	$post_meta .= '&lt;div class="post-author-avatar"&gt;';
	$post_meta .= get_avatar( get_the_author_meta('user_email'), 72);
	$post_meta .= '&lt;/div&gt;&lt;!-- end #post-author-avatar --&gt;';

	// Post details.
	$post_meta .= '&lt;ul class="post-meta-list"&gt;';
	// Author name and posts URL
	$post_meta .= '&lt;li&gt;Posted by : ' . $author_link . '';
	// List categories
	$post_meta .= '&lt;li&gt;Categories : ' . $cats_link . '';
	// List tags.
	if ( $tag_link )
	$post_meta .= '&lt;li&gt;' . $tag_link . '';
	// Permalink.
	$post_meta .= '&lt;li&gt;Bookmark : &lt;a title="Permalink to ' . the_title_attribute( 'echo=0' ) . '" href="'. get_permalink() . '" rel="bookmark"&gt;Permanent Link&lt;/a&gt;';
	// Edit post
	if ( current_user_can('edit_post') )
	$post_meta .= '&lt;li&gt;Manage : ' . $edit_post_link . '';
	$post_meta .= '&lt;ul&gt;';
	
	$post_meta .=  '&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;!-- end class post_meta-foot --&gt;';
	
	echo apply_filters( 'twentyten_posted_in', $post_meta);
} // END function twentyten_posted_in
</pre>
</div>
<p>After some minimal styling, it appears as below. Cool, isn’t it? </p>
<div style="width: 650px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2011/05/FirefoxScreenSnapz0011.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="FirefoxScreenSnapz001" border="0" alt="FirefoxScreenSnapz001" src="http://kav.in/blog/wp-content/uploads/2011/05/FirefoxScreenSnapz001_thumb1.png" width="600" height="250"></a> </p>
<p class="wp-caption-text">New output from our redeclared function twentyten_posted_in</p>
</div>
<h3>&nbsp;</h3>
<hr />
<h3><font style="font-weight: bold">Overriding with alternate files (namesakes)</font></h3>
<p>Template files, for example -</p>
<ul>
<li>header.php
<li>footer.php
<li>loop.php
<li>sidebar.php
<li>anything.php <span style="color: #c0504d">except index.php(unless wp 3.0 or newer)</span> </li>
</ul>
<p>will be over ridden, when a file with exact same name as the original parent file is present in the child theme dir. For example, to replace header.php, put your own header.php in child theme’s folder. Also, it&#8217;s better to copy the <span class="spancode">header.php</span> from parent theme( here twenty ten), to child theme’s folder (here ashten) and then proceed with modifications. This way we can make sure we steer safe from messed up HTML tags. </p>
<hr />
<h2 id="styling-the-child-theme">Styling the Child theme</h2>
<p>As told earlier, css styling can be done either from scratch, or after using <span class="spancode">@import url(“../twentyten/style.css”);</span>. (Google&#8217;s page speed advises to avoid CSS @import, in such case, simply copy the code to the child). Child theme’s styles will override the parent theme’s styles as they occur later ( CSS cascading &#8211; later rules have higher priority ).</p>
<hr />
<p>Next post on this series will be on adding various dropdown menu solutions and then fancy post sliders will follow.</p>
<p><em>Cheerio,<br /></em><em><strong>Kavin</strong></em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=W-DAnyBPexo:NFab3_Yl3pw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=W-DAnyBPexo:NFab3_Yl3pw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=W-DAnyBPexo:NFab3_Yl3pw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=W-DAnyBPexo:NFab3_Yl3pw:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=W-DAnyBPexo:NFab3_Yl3pw:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/W-DAnyBPexo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wordpress-child-theme-twenty-ten-diy/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://kav.in/wordpress-child-theme-twenty-ten-diy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-child-theme-twenty-ten-diy</feedburner:origLink></item>
		<item>
		<title>Troubleshooting Synergy(Keyboard Mouse sharing) problems</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/-P_tToHeAeU/</link>
		<comments>http://kav.in/troubleshooting-synergy-keyboard-mouse-sharing/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 20:00:40 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Gadgetry]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[Os X 86]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[Blocked]]></category>
		<category><![CDATA[Common]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[Connect]]></category>
		<category><![CDATA[Hook library]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[Synergy]]></category>
		<category><![CDATA[Timed out]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[video Fullscreen]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://kav.in/?p=874</guid>
		<description><![CDATA[I previously posted an article on installing synergy on multiple operating systems. If you don&#8217;t know what synergy is, you may want to proceed over here and take a look. It is a keyboard mouse sharing via network, simply put. This article deals with the problems that frequently/occasionally occur on getting synergy working. Come on, [...]]]></description>
			<content:encoded><![CDATA[<p>I previously posted an article on installing synergy on multiple operating systems. If you don&#8217;t know what synergy is, you may want to proceed over here and <a href="http://kav.in/living-with-synergy-keyboardmouse-sharing-solution">take a look</a>. It is a keyboard mouse sharing via network, simply put. This article deals with the problems that frequently/occasionally occur on getting synergy working.</p>
<p><span id="more-874"></span></p>
<p>Come on, who do want to use 3 Keyboards/mice at once? Well, I don&#8217;t. Using synergy quite a while on 3 of my computers – an iMac,  a Windows 7 PC  and Ubuntu(10.10) powered one, i wish to say that&#8217;s a geek&#8217;s advantage.</p>
<p style="background: #ffffe0; border: #e6bd55 1px solid; padding: 5px;">If you have not downloaded Synergy yet, now is the time! Get this awesome <em>free</em>-<span style="text-decoration: underline;">open source</span> software over <a title="Download Synergy" rel="nofollow" href="http://synergy-foss.org/" target="_blank">here</a>.</p>
<h2><span style="text-decoration: underline;">Common problems </span></h2>
<p>Synergy’s status can be found with the tray(Windows)/Menu(Mac) icon.</p>
<p><a href="http://kav.in/blog/wp-content/uploads/2010/12/synergy_loaded.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="synergy_loaded" src="http://kav.in/blog/wp-content/uploads/2010/12/synergy_loaded_thumb.gif" border="0" alt="synergy_loaded" width="22" height="22" /></a> or  <a href="http://kav.in/blog/wp-content/uploads/2010/12/StatusRunning.png"><img style="padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="StatusRunning" src="http://kav.in/blog/wp-content/uploads/2010/12/StatusRunning_thumb.png" border="0" alt="StatusRunning" width="22" height="22" /></a> denotes that Synergy has started.</p>
<p><a href="http://kav.in/blog/wp-content/uploads/2010/12/connected.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="connected" src="http://kav.in/blog/wp-content/uploads/2010/12/connected_thumb.gif" border="0" alt="connected" width="18" height="18" /></a> or  <a href="http://kav.in/blog/wp-content/uploads/2010/12/StatusConnected.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="StatusConnected" src="http://kav.in/blog/wp-content/uploads/2010/12/StatusConnected_thumb.png" border="0" alt="StatusConnected" width="22" height="22" /></a> Synergy denotes Successful Client-server connection.</p>
<p>Chances are that you never saw the second one, eventually got frustrated and gave up. But trust me, Synergy is more worth the buck.</p>
<hr />
<h2><a href="http://kav.in/blog/wp-content/uploads/2010/12/asds.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Synergy" src="http://kav.in/blog/wp-content/uploads/2010/12/asds_thumb.gif" border="0" alt="Synergy" width="16" height="16" /></a> or <a href="http://kav.in/blog/wp-content/uploads/2010/12/StatusWarning.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="StatusWarning" src="http://kav.in/blog/wp-content/uploads/2010/12/StatusWarning_thumb.gif" border="0" alt="StatusWarning" width="22" height="22" /></a> Warning : Failed to connect to server : Connection Refused</h2>
<p>This happens when the client tries to connect to the server, which is turned off. Or, synergy server is not running.</p>
<p><span style="text-decoration: underline;">Solution</span> :</p>
<ul>
<li><span style="text-decoration: underline;">Start</span> Synergy on the server computer and make sure it is configured correctly. That should fix the issue.</li>
<li>If the above does not work, double check your <span style="text-decoration: underline;">firewall</span>/Antivirus.</li>
<li>Make the synergy <span style="text-decoration: underline;">auto start</span> at login or power-on. For example, in windows :</li>
</ul>
<p><a href="http://kav.in/blog/wp-content/uploads/2010/12/autostart_at_power1.gif"><img style="background-image: none; margin: 0px 0px 0px 50px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="autostart_at_power" src="http://kav.in/blog/wp-content/uploads/2010/12/autostart_at_power_thumb1.gif" border="0" alt="autostart_at_power" width="420" height="308" /></a></p>
<h2 id="connection-timed-out">Connection timed Out</h2>
<p><span style="text-decoration: underline;">Cause</span> : Most often, Firewall/Antivirus on the server is blocking your connection attempts. Sometimes, the server maybe down or crashed/Unresponsive (relatively common on windows <img src='http://kav.in/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ).</p>
<p><span style="text-decoration: underline;">Solution</span> : Synergy uses the port <span class="spancode">24800</span> for its communication. That port needs to be free/unblocked in the firewall.</p>
<ul>
<li>Open your Antivirus/Firewall configuration and allow the port <span class="spancode">24800</span> through the firewall. If you are not sure about how to open the port in your specific brand of Antivirus/Firewall, do a google search with the keywords <span class="spancode">Open port in ‘_ANTI_VIRUS_FIREWALL_NAME_HERE_’</span> . I use ISP branded F-Secure, which conveniently offers an option “Open a Port” in its Internet shield settings.</li>
<li>If the above solution does not work, check whether the server computer has crashed or Locked. If so, you need to restart it.</li>
</ul>
<h2 id="server-already-has-a-connected-client-with-name-"client_name"">Server already has a connected client with name &#8220;Client_Name&#8221;</h2>
<p><span style="text-decoration: underline;">Cause</span> : Two computers unintentionally given the same screen name(by which server identifies).</p>
<p><span style="text-decoration: underline;">Solution</span> :</p>
<ul>
<li>Change the name of one computer and try to reconnect.</li>
<li>If not, restart the synergy server. That is done by <span class="spancode">right clicking Tray icon –&gt; quit synergy</span> and <span class="spancode">Start menu –&gt; Programs –&gt; Synergy+ –&gt; Synergy+</span></li>
</ul>
<h2 id="make-video---games-stay-full-screen-with-synergy">Make Video / Games stay Full screen with synergy</h2>
<p><span style="text-decoration: underline;">Cause</span> : Most video and games applications needs to be on Focus when viewed full screen. When the focus is lost, obviously they leave full screen to window mode. Synergy on moving the cursor to the next screen(that is to another computer), captures the focus on the previous screen and takes foreground. So video applications/Games on losing focus, leaves full screen or minimizes.</p>
<p><span style="text-decoration: underline;">Fix</span> :</p>
<p>Windows : Open the synergy main window and click options. Usually the last one is “<span class="spancode">Don’t take foreground window on windows servers</span>” . Check and start the server.</p>
<p><a href="http://kav.in/blog/wp-content/uploads/2010/12/video_fullscreen.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="video_fullscreen" src="http://kav.in/blog/wp-content/uploads/2010/12/video_fullscreen_thumb.gif" border="0" alt="video_fullscreen" width="325" height="500" /></a></p>
<h2 id="cannot-initialize-hook-library---synergy-already-running?">Cannot initialize Hook library : Synergy already running?</h2>
<p><span style="text-decoration: underline;">Cause</span> : You are trying to run another instance, while it is already running on the background.</p>
<p><span style="text-decoration: underline;">Fix</span> :</p>
<ul>
<li>Try connecting the clients. Unless synergy has crashed, it should connect promptly.</li>
<li>If it does not, Open Task manager and look for synergys.exe under processes. Right click and choose to end the process.</li>
<li>If the above does not work, open command prompt(<a href="http://kav.in/blog/wp-content/uploads/2010/12/windows_icon.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Windows" src="http://kav.in/blog/wp-content/uploads/2010/12/windows_icon_thumb.png" border="0" alt="Windows " width="16" height="16" /></a>+R keys–&gt; Type “Cmd”-&gt;enter) and enter the below command. That should do it.</li>
</ul>
<p>
<pre class="brush: vb; auto-links: false; light: true; title: Code; notranslate"> taskkill /IM synergys.exe /F </pre>
</p>
<p>If it still doesn&#8217;t work, try gaucho&#8217;s tip, <a href="http://kav.in/troubleshooting-synergy-keyboard-mouse-sharing/comment-page-1#comment-6404">the first comment</a> below.</p>
<h2><a href="http://kav.in/blog/wp-content/uploads/2010/12/not_running.gif"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="not_running" src="http://kav.in/blog/wp-content/uploads/2010/12/not_running_thumb.gif" border="0" alt="not_running" width="16" height="16" /></a> Synergy : Not running / Synergy blocked tray icon</h2>
<p>Synergy configuration / Firewall &amp; everything seemed perfect. Yet, I faced this strange problem one day. Synergy tray icon showed a “blocked” symbol – i.e Red circle with a Diagonal line. I tried reconfiguration &amp; reinstalled synergy numerous times, which was of no help.</p>
<p><span style="text-decoration: underline;">Cause</span> : You probably installed an additional <strong>input</strong> Language in your windows PC. And synergy is incompatible with some of the language’s characters.</p>
<p><span style="text-decoration: underline;">Fix</span> : None other than removing the input language that’s conflicting. <img src='http://kav.in/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Hopefully this will be fixed, I presume. If anybody figured out a workaround, please share.</p>
<hr />
<h2><span style="text-decoration: underline;">Other Problems</span></h2>
<h3><span style="font-weight: bold;">Synergy : Cannot read configuration</span></h3>
<p>Cause : Something wrong with/in the Synergy configuration file.</p>
<p>Fix : If you typed the configuration file, Check for any typos and correct <span class="spancode">Section : name ……. End</span> syntax. Otherwise, delete the configuration file and redo.</p>
<h3><strong>Cannot move cursor back to the other/previous screen</strong></h3>
<p>Cause : Unintentional wrong configuration. Trust me, it may get confusing sometimes.</p>
<p>Fix : Correct the configuration. In recent/beta versions of synergy, It is easy &#8211; just as arranging the monitor icons in exact order. If you have older version, proceed.</p>
<h2 id="synergy-configuration-revisited">Synergy Configuration Revisited</h2>
<p>Example :</p>
<p>You have two computers – For example iMac and Windows 7 Dell. Imagine those as two persons (or gals maybe <img src='http://kav.in/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ) standing next to each other.</p>
<ul>
<li>For iMac, dell is on the left. For Dell, iMac is on the right.</li>
<li>Otherwise said, Dell is right of iMac. iMac is left of Dell.</li>
</ul>
<p>i.e. relative to them. Likewise, relative to the computers. And not relative to third person/us. Got it? <img src='http://kav.in/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>So synergy configuration window – Click [New Link] and below the box, Enter the correct configuration like in the example above. That should do it.</p>
<hr />
<p>My previous detailed post on Synergy Installation and configuration in Windows, Mac OS and Ubuntu Linux <a title="Synergy on  Windows, Mac OS, Linux - In depth tutorial." href="http://kav.in/living-with-synergy-keyboardmouse-sharing-solution" target="_blank">can be found here</a>.</p>
<p>United, we rule.</p>
<p>Kavin. <img src='http://kav.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=-P_tToHeAeU:dFpessle_a0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=-P_tToHeAeU:dFpessle_a0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=-P_tToHeAeU:dFpessle_a0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=-P_tToHeAeU:dFpessle_a0:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=-P_tToHeAeU:dFpessle_a0:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/-P_tToHeAeU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/troubleshooting-synergy-keyboard-mouse-sharing/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://kav.in/troubleshooting-synergy-keyboard-mouse-sharing/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=troubleshooting-synergy-keyboard-mouse-sharing</feedburner:origLink></item>
		<item>
		<title>Including Javascript and CSS in wordpress – The ultimate guide</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/9Q13qj3L8Dk/</link>
		<comments>http://kav.in/including-javscript-css-wordpress-guide/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 07:27:45 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[Wordpress themes]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[built-in]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[enqueue]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[kavin]]></category>
		<category><![CDATA[noConflict]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[selective]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wp]]></category>
		<category><![CDATA[wp-admin]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://kav.in/?p=840</guid>
		<description><![CDATA[WordPress provides a lot of coding convenience for a beginning developer. This guide explains the clean and proper way of including your Javascript and CSS with your wordpress themes and plugins. Including scripts The traditional method is by using the &#60;script&#62;&#60;/script&#62; tag. Example. &#60;script src="http://example.com/scripts/script.js" type="text/javascript"&#62;&#60;/script&#62; With wordpress, procedure of including and managing scripts have [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress provides a lot of coding convenience for a beginning developer. This guide explains the clean and proper way of including your Javascript and CSS with your wordpress themes and plugins.</p>
<p><span id="more-840"></span></p>
<h2 id="including-scripts">Including scripts</h2>
<p>The traditional method is by using the <span class="spancode">&lt;script&gt;&lt;/script&gt;</span> tag.</p>
<p>Example.</p>
<pre>&lt;script src="http://example.com/scripts/script.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
<p>With wordpress, procedure of including and managing scripts have never been more tidier.</p>
<p>WordPress ships with a lot of included scripts, though some of them might not be up to date. Script related wordpress functions are</p>
<ol>
<li>
<ol>
<li>
<ol>
<li><a title="Wordpress codex reference - wp_register_Script" href="http://codex.wordpress.org/Function_Reference/wp_register_script" target="_blank">wp_register_script()</a></li>
<li><a title="Wordpress Codex reference - wp_enqueue_script" href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" target="_blank">wp_enqueue_script   Codex()</a></li>
<li><a title="wordpress codex reference - wp_deregister_script" href="http://codex.wordpress.org/Function_Reference/wp_deregister_script" target="_blank"><span style="color: #4f81bd;">wp_deregister_script()</span></a></li>
</ol>
</li>
</ol>
</li>
</ol>
<p>Click the respective functions for usage and parameters. These functions and others listed below are entered in your theme’s <span class="spancode">functions.php</span>.</p>
<p>These functions are best understood with examples.</p>
<p>Example below, Include a script that comes with wordpress. e.g. jQuery or prototype.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
// All of these goes in functions.php
function load_inbuilt_scripts() {
    wp_enqueue_script('jquery');
    wp_enqueue_script('prototype');
}

add_action('init', 'load_inbuilt_scripts');
?&gt;</pre>
<p>Example below, Load your own script to replaces the built-in one.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
function my_own_incl_scripts() {
	// remove the inbuilt one first.
    	wp_deregister_script('jquery');
	// assign theme directory url to a variable
	$themedir = get_bloginfo('template_url');
	wp_enqueue_script('jquery', $themedir . &quot;/scripts/jquery/jquery.js&quot;);
}

add_action('init', 'my_own_incl_scripts');
?&gt;</pre>
<p>Load a script from alternate location e.g. google AJAX CDN or any remote server. Thereby replacing the inbuilt one.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
function load_remote_scripts() {
	wp_deregister_script('jquery'); //remove the in built one first.
	// Include the google cdn jQuery
	wp_enqueue_script('jquery', &quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;);
	// Load mootools from A remote server. Notice the script name.
	wp_enqueue_script('moo', &quot;https://example.com/cdn/js/mootools.js&quot;);
}

add_action('init', 'load_remote_scripts');
?&gt;</pre>
<p>Example below, on Loading a script with wp_enqueue_script() and arguments.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
/* Say you need the script -
		* named &quot;my_dep_script&quot;
		* located in &quot;&quot;/scripts/cool/accord.js&quot;
		* which is dependent on jQuery framework
		* and of version 1.2.3,
		* should be loaded in footer.
*/
function script_with_args() {
	wp_enqueue_script(
		'my_dep_script', // name of the script
		get_bloginfo('template_url') .&quot;/scripts/accord.js&quot;, // location
		array('jquery'), //dependencies
		'1.2.3', // script version
		true); // load in footer.( wp_footer() must be present!)
}

add_action('init', 'script_with_args');
?&gt;</pre>
<h2 id="including-styles">Including styles</h2>
<p>Well, procedure is similar to scripts above. Style related functions are</p>
<ol>
<li>
<ol>
<li>
<ol>
<li><a title="Wordpress Codex Reference : wp_register_style" href="http://codex.wordpress.org/Function_Reference/wp_register_style" target="_blank">wp_register_style()</a></li>
<li><a title="Wordpress Codex reference : wp_enqueue_style" href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style" target="_blank">wp_enqueue_style()</a></li>
</ol>
</li>
</ol>
</li>
</ol>
<p>It is done with the wordpress function <span class="spancode">wp_enqueue_style()</span> (<a title="Wordpress codex reference : wp_enqueue_style" href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style" target="_blank">codex reference</a>).</p>
<p>Example below, Load a stylesheet file “my_style.css” from scripts sub folder.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
function load_my_styles() {
	// assign the url of theme to a variable $themedir
	$themedir = get_bloginfo('template_url');
	wp_enqueue_style( 'my_style',  $themedir . &quot;/styles/my_style.css&quot;);
	}

// Load the above function via init hook.
add_action('init', load_my_styles);
?&gt;</pre>
<p>Example below, Load a style with wp_enqueue_style and arguments.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
function load_style_args() {
	$themedir = get_bloginfo('template_url');

	wp_enqueue_style(
		// Arg 1) name that wordpress refers to.
		'my_style_2',
		// Arg 2) URL to theme directory
		$themedir . &quot;/styles/my_style_2.css&quot;,
		// Arg 3) its dependencies. Loaded in previous function.
		array('my_style'),
		// Arg 4) version of the style
		'0.1.2' ,
		// Arg 5) type : media, Other - print, all.
		screen );
}

add_action( 'init', 'load_style_args');
?&gt;</pre>
<h2 id="usage-and-argument-of-above-functions">Usage and Argument of above functions</h2>
<p><span class="spancode">wp_enqueue_script</span> and <span class="spancode">wp_register_script</span> both act similar, except that the url(<em>second argument</em>) is optional for the former.</p>
<p>Example usage of <span class="spancode">wp_enqueue_script()</span> function with arguments.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
// $handle : Name that wordpress handles this script with.
// $src : location of the script file, if it's not included already.
// $deps : Other scripts THIS scripts depends upon. Default - array()
// $ver : Version of the script. Optional. - Default - WordPress version.
// $in_footer : Loads the script in footer. - Default - false.
?&gt;</pre>
<p>As like the script handling functions above, similar are <span class="spancode">wp_enqueue_style</span> and <span class="spancode">wp_register_style</span>.</p>
<p>Example usage of <span class="spancode">wp_enqueue_style()</span> with parameters.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
wp_enqueue_style( $handle, $src, $deps, $ver, $media );
// $handle : Name of the stylesheet.
// $src : Path to the stylesheet.
// $deps : Styles that should be loaded before this style.
// $ver : Version of the style.
// $media : screen , media, handheld or print.
?&gt;</pre>
<h2 id="using-javascript-and-css-in-wordpress-admin-pages">Using Javascript and CSS in wordpress admin pages</h2>
<p>You can use the <span class="spancode">is_admin()</span> function of wordpress to load the javascript and css only in admin pages. Quite useful for plugin and theme developers.</p>
<p>An example.</p>
<pre class="brush: php; title: Code; notranslate"> &lt;?php
if( is_admin()) {
	// scripts and styles for wp-admin here.
	// This loads only on admin pages.
	wp_enqueue_script('jquery');
	wp_enqueue_script('admin_fx',
	$themedir . &quot;/scripts/admin/admin.js&quot;);
	wp_enqueue_style('my_admin_css', $themedir . &quot;/styles/admin/admin_styles.css&quot;);
}

if( !is_admin()) {
	// scripts and styles for regular wordpress pages.
	wp_enqueue_script('mootools');
	wp_enqueue_style('my_blog.css');
}
?&gt;</pre>
<p>Above function loads the scripts and styles globally in all admin pages e.g. Dashboard, Appearance, Plugins, settings sections.</p>
<p>But, what if you want to include a javascript file to a single admin page(e.g. Theme options)? It is not that hard. Trust me.</p>
<p>Example</p>
<pre class="brush: php; highlight: [7,16,19,20,21,22,23,24,25]; title: Add javascript and css, Only on options page.; notranslate"> &lt;?php // Functions.php
// This adds the options page to the admin_menu hook.
add_action('admin_menu', 'theme_admin_page');

// Example options.page - Define the location and section.
function theme_admin_page() {
	$page = add_submenu_page(
			'themes.php',
			'Great Theme Options',
			'Customize theme',
			'edit_themes',
			'options',
			'theme_options_page'
			);
	// Add the scripts and styles ONLY to options page.
	add_action('admin_print_scripts-'. $page, 'options_includes');
}

function options_includes(){
	if ( is_admin()) {
		wp_enqueue_style('admin_css_own', get_bloginfo('template_url') . &quot;/styles/my_style.css&quot;);
		wp_enqueue_script('scriptaculous');
		wp_enqueue_script('admin_fx', get_bloginfo('template_url') . &quot;/scripts/admin_fx.js&quot;, array('scriptaculous'), '0.2.3', true );
	}
}

function theme_options_page(){
	echo '&lt;div class=&quot;wrap&quot;&gt;';
	echo '&lt;div id=&quot;icon-tools&quot; class=&quot;icon32&quot;&gt;&lt;/div&gt;';
	echo '&lt;h2&gt;Sample Theme Options&lt;/h2&gt;';
	echo &quot;&lt;p&gt; Hello there! This is your admin page&lt;/p&gt;&quot;;
	// Form goes here.
	echo &quot;&lt;/div&gt;&lt;!-- end the wrap container --&gt;&quot;;
}
?&gt;</pre>
<p>That does the job.</p>
<h2 id="selective-use-of-javascript-and-css">Selective use of Javascript and CSS</h2>
<p>There might be some situations when you want to run  javascript code on a single type of page. For example : you might want to include a script that runs only on Author pages. You can do it with the conditional tag <span class="spancode">is_author()</span> and <span class="spancode">wp_enqueue_script()</span> function. Usage is similar to the is_admin() above.</p>
<p>Likewise, with <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank">conditional tags</a> you can selectively use Javascript and css in wordpress.</p>
<h2 id="notes-and-troubleshooting">Notes and Troubleshooting</h2>
<ol class="tutor_list">
<li>When you replace the jQuery that ships with wordpress, make sure to use noConflict mode. This allows simultaneous usage of other script libraries. More about this <a title="jQuery noConflict()" href="http://api.jquery.com/jQuery.noConflict/" target="_blank">here</a>.</li>
<li>When your script is not working, check whether it is loaded. You can use Firefox’s Firebug extension (or Chrome’s Inspect element so). Look under the <em>“Net” Panel</em> –&gt;  <em>“JS” tab</em> for any 404 not found error(Colored Red). If it is a 404, then check whether the path to the script is correct. Double check the variables and concatenation, if you use them. If not, there must be something wrong with the javascript code. Most common culprits are spelling errors and case-sensitivity.</li>
<li>Check with firebug for any duplicate scripts. Plugins may sometimes use a different version of the same library that you use.</li>
<li>It is recommended to load the scripts in the wp footer. You can do this with $in_footer (5th) argument of <span class="spancode">wp_enqueue_script</span>.</li>
<li>Always perform these procedures on a locally installed wordpress(<a title="Install wordpress in you Windows PC using XAMPP" href="http://kav.in/how-to-install-portable-local-server-on-your-windows-pc-using-xampp" target="_blank">PC</a>, <a title="Install WordPress in you Mac using MAMP" href="http://kav.in/installing-a-portable-local-server-in-your-mac-using-mamp/" target="_blank">Mac</a>), or at least on an alternate wordpress installation.</li>
</ol>
<h3 id="conclusion">Conclusion</h3>
<p>The purpose of this guide is to provide organized information that is often vague and scattered through out the web. If you have any questions/ wish to correct me, or criticism which i really appreciate, Please do.</p>
<p>Beginners learning Javascript can make use of these books &#8211; <a href="http://www.amazon.com/gp/product/0596101996/ref=as_li_tf_tl?ie=UTF8&#038;tag=capability-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596101996">JavaScript: The Definitive Guide</a><img src="http://www.assoc-amazon.com/e/ir?t=capability-20&#038;l=as2&#038;o=1&#038;a=0596101996" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by David flanagan, or <a href="http://www.amazon.com/gp/product/0596517742/ref=as_li_ss_tl?ie=UTF8&#038;tag=capability-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596517742">JavaScript: The Good Parts</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=0596517742" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by Douglas Crockford. While Complete knowledge of javascript is not needed nowadays, because of availablity of multiple javascript frameworks such as jQuery, prototype. But it does serve build a strong base for the frameworks.<br />
&nbsp;</p>
<p><!--aiospwlwbstart<br />
aiosp_title=Including Javascript and CSS with wordpress  : An ultimate guide<br />
aiosp_keywords=Wordpress, Javascript, CSS, include, Plugins, Themes, built-in, replace, jQuery, noConflict, admin, wp-admin, options, wp, enqueue, register, script, style, parameters, arguments, prototype, selective, debug, kavin, blogging, writing<br />
aiosp_description=Know how to include objects with wordpress - Javascript, CSS in a proper way. And with lot of Examples. Everything from including a single script to selective include Javascript and CSS only in your plugin or theme.<br />
aiospwlwbsend--></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=9Q13qj3L8Dk:dOTVnZa2ibc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=9Q13qj3L8Dk:dOTVnZa2ibc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=9Q13qj3L8Dk:dOTVnZa2ibc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=9Q13qj3L8Dk:dOTVnZa2ibc:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=9Q13qj3L8Dk:dOTVnZa2ibc:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/9Q13qj3L8Dk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/including-javscript-css-wordpress-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://kav.in/including-javscript-css-wordpress-guide/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=including-javscript-css-wordpress-guide</feedburner:origLink></item>
		<item>
		<title>WordPress How to : Dealing with the paths and links</title>
		<link>http://feedproxy.google.com/~r/Capability/~3/4Tv2E2s7s7s/</link>
		<comments>http://kav.in/wordpress-absolute-relative-paths/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 21:34:18 +0000</pubDate>
		<dc:creator>kavin</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web designing]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[Wordpress themes]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[abspath]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[bloginfo]]></category>
		<category><![CDATA[constants]]></category>
		<category><![CDATA[get_bloginfo]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[kavin]]></category>
		<category><![CDATA[paths]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[proper]]></category>
		<category><![CDATA[relative]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://kav.in/wordpress-absolute-relative-paths</guid>
		<description><![CDATA[Complete guide that explains the use of absolute and relative paths in wordpress. Also explained, how to use variables to output URLs. Very useful for beginning Wordpress developers.]]></description>
			<content:encoded><![CDATA[<p>When you begin wordpress development, dealing with the paths can get extremely confusing. This guide helps you in dealing with absolute and relative links in wordpress.</p>
<p> <span id="more-822"></span><br />
<h2 id="absolute-and-relative-paths">Absolute and relative paths</h2>
<p>Absolute path is the Full path to an object or a document in the filesystem, whereas Absolute URI is the Full URL to the object or document.</p>
<p>Example of Absolute URL</p>
<pre>http://kav.in/downloads/wordpress/

http://ftp5.gwdg.de/pub/linux/debian/debian-cd/5.0.7/i386/iso-dvd/

</pre>
<p>&nbsp;</p>
<p>And relative path refers to the locations of the objects and documents relative to the document on the same server.&nbsp; </p>
<p>Example : Relative path to sub directory images.&nbsp; </p>
<pre>&lt;img src="images/picture1.jpg" title="An awesome picture" /&gt; </pre>
<p>Example : relative path to an image inside a folder images located a level above the current document folder is done with&nbsp; <span class="spancode">../</span> .&nbsp; Similarly, <span class="spancode">../../</span> refers to the directory that’s two levels above the current one.&nbsp; </p>
<pre>&lt;img src="../images/picture_up_above_inside.jpg" title="The picture above" /&gt;</pre>
<p>Be careful when you are using relative paths in wordpress.</p>
<h2 id="wordpress-theme-paths-">WordPress theme paths </h2>
<p>Both absolute and relative paths can be used in wordpress. Absolute and relative paths are used in PHP/html while CSS uses mostly relative. </p>
<p>Images in the same server are referred to with relative paths in CSS. </p>
<div style="width: 470px" class="wp-caption"><a href="http://kav.in/blog/wp-content/uploads/2010/12/wp_file_paths.png" rel="shadowbox"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="wp_file_paths" border="0" alt="wp_file_paths" src="http://kav.in/blog/wp-content/uploads/2010/12/wp_file_paths_thumb.png" width="458" height="745"></a> </p>
<p class="wp-caption-text">Graphical example on using the paths</p>
</div>
<p>Take a look at the above image. let us link to these image from css. Now please proceed to the below example code.</p>
<pre class="brush: css; highlight: [3,7,11]; title: Code; notranslate">
/* link to picture inside sub-folder images */
body {
	background: url(&quot;images/achu.gif&quot;) repeat;
}
/* link to an image in directory a level above. */
.awesome-picture {
	background: url(&quot;../uploads/picture1.jpg&quot;);
}
/* Linking to an image on another server with Absolute server */
.strangewrap  {
	background: url(&quot;http://capability.es/top/secret/strange/omg.png&quot;) no-repeat;
	display: block;
	width: 150px;
	height:80px;
}
</pre>
<h2 id="variables">Variables</h2>
<p>Use of PHP variables can save us a lot of time and code. WordPress’&nbsp; built-in functions <span class="spancode">bloginfo()</span> and <span class="spancode">get_bloginfo()</span> displays your blog’s information. While the former automatically echoes the output, latter is for use only with php <span class="spancode">echo</span>. Check out the WordPress Codex reference for <a title="Wordpress codex reference - bloginfo()" href="http://codex.wordpress.org/Template_Tags/bloginfo" target="_blank">bloginfo()</a> and <a title="Wordpress codex reference : get_bloginfo()" href="http://codex.wordpress.org/Function_Reference/get_bloginfo" target="_blank">get_bloginfo()</a> for the usage and arguments. </p>
<p>Open your theme’s header.php and insert these code above the header [ <span class="spancode">div id=”header”&gt;</span> ]</p>
<p>An example, if you want to get the Absolute path to your theme directory.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:bf3fef6e-d87f-45bd-bd75-f0113cc2571e" class="wlWriterEditableSmartContent">
<pre class="brush: php;">&lt;?php bloginfo('template_url'); ?&gt; 
// OR
&lt;?php echo get_bloginfo('template_url'); ?&gt;

// Output in my case was 
// http://kav.in/sandbox/wp-content/themes/twentyten</pre>
</div>
<p>Note the use of <span class="spancode">echo</span> with the function <span class="spancode">get_bloginfo()</span> , as <span class="spancode">get_bloginfo</span> does not echo the output by default. </p>
<p>Say, for example you have a sub-folder “scripts” within the theme folder. Now you may need to link to a javascript file <span class="spancode">script.js</span> inside it. So, instead of typing the entire URL again and again, we can just use&nbsp; <span class="spancode">get_bloginfo</span>. It also helps avoid the typos. </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:bae5a455-c7cc-455a-b56e-43204e56471b" class="wlWriterEditableSmartContent">
<pre class="brush: html;">&lt;?php
$themedir = get_bloginfo('template_url');  //assign the theme path to variable $themedir
// similarly $scriptdir = $themedir . “/scripts”;
?&gt;
&lt;script src="&lt;?php echo $themedir ?&gt;/scripts/script.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
</div>
<h2 id="wordpress-constants">WordPress Constants</h2>
<p>Constants store information which can be used through out the template. Once defined, its value remains constant.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a9fcaaf8-87e1-44ef-93fa-ad570bf75673" class="wlWriterEditableSmartContent">
<pre class="brush: php;">&lt;?php // THIS goes in functions.php
// defined constants can be used throughout the theme now.
define( 'THMDIR', get_bloginfo('template_url'));
define( 'SCRIPTDIR', get_bloginfo('template_url') ."/scripts");
?&gt;
&lt;!-- this goes in header.php--&gt;
&lt;script src="&lt;?php echo THMDIR ?&gt;/scripts/script.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="&lt;?php echo SCRIPTDIR ?&gt;/script2.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
</div>
<p class="notify-reader">Note: Make sure you start with the forward slash after the variable name, when you use <span class="spancode">get_bloginfo</span> to return the URI. </p>
<p><hr />
Thanks for reading, </p>
<p>Kavin</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Capability?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Capability?i=4Tv2E2s7s7s:5HpwPXSBfBI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Capability?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Capability?i=4Tv2E2s7s7s:5HpwPXSBfBI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Capability?i=4Tv2E2s7s7s:5HpwPXSBfBI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Capability?a=4Tv2E2s7s7s:5HpwPXSBfBI:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/Capability?i=4Tv2E2s7s7s:5HpwPXSBfBI:-BTjWOF_DHI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Capability/~4/4Tv2E2s7s7s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kav.in/wordpress-absolute-relative-paths/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://kav.in/wordpress-absolute-relative-paths/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-absolute-relative-paths</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.516 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-10 17:36:19 --><!-- Compression = gzip -->
