<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MHunt Design &#187; Snippets</title>
	<atom:link href="http://mhuntdesign.com/blog/articles/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://mhuntdesign.com/blog</link>
	<description>Web Design Resources and Recommended Reading</description>
	<lastBuildDate>Sat, 04 Feb 2012 09:03:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Working with WordPress child themes: Including files and getting the theme path</title>
		<link>http://mhuntdesign.com/blog/wordpress/wordpress-child-theme-get-theme-path/</link>
		<comments>http://mhuntdesign.com/blog/wordpress/wordpress-child-theme-get-theme-path/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 22:53:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://mhuntdesign.com/blog/?p=857</guid>
		<description><![CDATA[Recently I have been creating child themes in wordpress and It turns out that we cant use TEMPLATEPATH for including files and template_directory for getting the full theme directory path. These reference the actual parent theme. We need to use stylesheet_directory and STYLESHEETPATH. Here are two examples we would use when dealing with child themes: [...]


Related posts:<ol><li><a href='http://mhuntdesign.com/blog/bookmarks/freelance-web-design-drupal-development-wordpress-seo-jquery-css-10-28-10-10-30-10/' rel='bookmark' title='Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-28-10 &#8211; 10-30-10'>Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-28-10 &#8211; 10-30-10</a> <small>Below are my latest resources related to web design, development,...</small></li>
<li><a href='http://mhuntdesign.com/blog/bookmarks/freelance-web-design-drupal-development-wordpress-seo-jquery-css-10-22-10-10-23-10/' rel='bookmark' title='Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-22-10 &#8211; 10-23-10'>Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-22-10 &#8211; 10-23-10</a> <small>Below are my latest resources related to web design, development,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fwordpress%2Fwordpress-child-theme-get-theme-path%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fwordpress%2Fwordpress-child-theme-get-theme-path%2F&amp;source=mhuntdesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I have been creating child themes in wordpress and It turns out that we cant use TEMPLATEPATH for including files and template_directory for getting the full theme directory path. These reference the actual parent theme. We need to use stylesheet_directory and STYLESHEETPATH.</p>
<p>Here are two examples we would use when dealing with child themes:</p>
<p>&lt;?php include (STYLESHEETPATH . &#8216;/includes/pageheader.php&#8217;); ?&gt;</p>
<p>&lt;script src=&#8221;&lt;?php echo bloginfo(&#8216;stylesheet_directory&#8217;); ?&gt;/js/modernizr-1.5.min.js&#8221;&gt;&lt;/script&gt;</p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://codex.wordpress.org/Function_Reference/locate_template">http://codex.wordpress.org/Function_Reference/locate_template</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/bloginfo">http://codex.wordpress.org/Template_Tags/bloginfo</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://mhuntdesign.com/blog/bookmarks/freelance-web-design-drupal-development-wordpress-seo-jquery-css-10-28-10-10-30-10/' rel='bookmark' title='Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-28-10 &#8211; 10-30-10'>Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-28-10 &#8211; 10-30-10</a> <small>Below are my latest resources related to web design, development,...</small></li>
<li><a href='http://mhuntdesign.com/blog/bookmarks/freelance-web-design-drupal-development-wordpress-seo-jquery-css-10-22-10-10-23-10/' rel='bookmark' title='Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-22-10 &#8211; 10-23-10'>Freelance Web Design: Drupal Development, WordPress, SEO, jQuery, CSS: 10-22-10 &#8211; 10-23-10</a> <small>Below are my latest resources related to web design, development,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://mhuntdesign.com/blog/wordpress/wordpress-child-theme-get-theme-path/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to create a sidebar navigation in WordPress</title>
		<link>http://mhuntdesign.com/blog/wordpress/how-to-create-a-sidebar-navigation-in-wordpress/</link>
		<comments>http://mhuntdesign.com/blog/wordpress/how-to-create-a-sidebar-navigation-in-wordpress/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 01:26:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://mhuntdesign.com/blog/?p=370</guid>
		<description><![CDATA[Here&#8217;s a snippet that will give you an instant sidebar navigation in WordPress. It grabs the post parent title and the children of that parent. &#60;div id=&#34;sidebar-nav&#34;&#62; &#60; ?php if($post-&#62;post_parent) { ?&#62; &#60; ?php $parent_title = get_the_title($post-&#62;post_parent); ?&#62; &#60; ?php $permalink = get_permalink($post-&#62;post_parent); ?&#62; &#60;h3&#62;&#60;a href=&#34;&#60;?php echo $permalink; ?&#62;&#34; title=&#34;&#60; ?php echo $parent_title; ?&#62;&#34;&#62;&#60; ?php [...]


Related posts:<ol><li><a href='http://mhuntdesign.com/blog/css/how-to-create-a-css3-border-fadeout/' rel='bookmark' title='How to create a CSS3 border fadeout'>How to create a CSS3 border fadeout</a> <small>With CSS3, you can create a border that fades out...</small></li>
<li><a href='http://mhuntdesign.com/blog/apple/how-to-create-a-custom-apple-ipadiphone-home-screen-icon-for-your-website/' rel='bookmark' title='How to create a custom Apple iPad/iPhone Home screen icon for your Website'>How to create a custom Apple iPad/iPhone Home screen icon for your Website</a> <small>When you bookmark a site on the iPad or iPhone,...</small></li>
<li><a href='http://mhuntdesign.com/blog/wordpress/wordpress-child-theme-get-theme-path/' rel='bookmark' title='Working with WordPress child themes: Including files and getting the theme path'>Working with WordPress child themes: Including files and getting the theme path</a> <small>Recently I have been creating child themes in wordpress and...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fwordpress%2Fhow-to-create-a-sidebar-navigation-in-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fwordpress%2Fhow-to-create-a-sidebar-navigation-in-wordpress%2F&amp;source=mhuntdesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Here&#8217;s a snippet that will give you an instant sidebar navigation in <a href="http://wordpress.org">WordPress</a>. It grabs the post parent title and the children of that parent.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;sidebar-nav&quot;&gt;
&lt; ?php if($post-&gt;post_parent) { ?&gt;
&lt; ?php $parent_title = get_the_title($post-&gt;post_parent); ?&gt;
&lt; ?php $permalink = get_permalink($post-&gt;post_parent); ?&gt;
&lt;h3&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$permalink</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;&lt; ?php echo $parent_title; ?&gt;&quot;&gt;&lt; ?php echo $parent_title; ?&gt;&lt;/a&gt;&lt;/h3&gt;
 &lt; ?php } else { ?&gt;
&lt;h3&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;&lt; ?php echo $parent_title; ?&gt;&quot;&gt;&lt; ?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
&lt; ?php } ?&gt; 
&nbsp;
&lt; ?php
if($post-&gt;post_parent) {
$children = wp_list_pages(&quot;title_li=&amp;child_of=&quot;.$post-&gt;post_parent.&quot;&amp;echo=0&quot;); 
}
else {
$children = wp_list_pages(&quot;title_li=&amp;child_of=&quot;.$post-&gt;ID.&quot;&amp;echo=0&quot;); 
}
if ($children) { ?&gt; 
&lt;ul&gt;
&lt; ?php echo $children; ?&gt;
&lt;/ul&gt;
&lt; ?php } ?&gt;
&lt;/div&gt;</pre></div></div>



<p>Related posts:<ol><li><a href='http://mhuntdesign.com/blog/css/how-to-create-a-css3-border-fadeout/' rel='bookmark' title='How to create a CSS3 border fadeout'>How to create a CSS3 border fadeout</a> <small>With CSS3, you can create a border that fades out...</small></li>
<li><a href='http://mhuntdesign.com/blog/apple/how-to-create-a-custom-apple-ipadiphone-home-screen-icon-for-your-website/' rel='bookmark' title='How to create a custom Apple iPad/iPhone Home screen icon for your Website'>How to create a custom Apple iPad/iPhone Home screen icon for your Website</a> <small>When you bookmark a site on the iPad or iPhone,...</small></li>
<li><a href='http://mhuntdesign.com/blog/wordpress/wordpress-child-theme-get-theme-path/' rel='bookmark' title='Working with WordPress child themes: Including files and getting the theme path'>Working with WordPress child themes: Including files and getting the theme path</a> <small>Recently I have been creating child themes in wordpress and...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://mhuntdesign.com/blog/wordpress/how-to-create-a-sidebar-navigation-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linking to Google&#8217;s Hosted jQuery Repository</title>
		<link>http://mhuntdesign.com/blog/jquery/linking-to-googles-jquery-repository/</link>
		<comments>http://mhuntdesign.com/blog/jquery/linking-to-googles-jquery-repository/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 02:00:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://mhuntdesign.com/blog/?p=110</guid>
		<description><![CDATA[jQuery Hosted on Google: Here&#8217;s the code to link to Google&#8217;s jQuery repository. It grabs the latest jQuery version. &#60;script src="http://code.jquery.com/jquery-latest.js"&#62;&#60;/script&#62; If you want to target a particular version of jquery: &#60;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&#62;&#60;/script&#62; Google link to jQuery: You can go here http://code.google.com/p/jqueryjs/downloads/list for the download list and right-click copy-link location. Jquery CDNs Go to http://docs.jquery.com/Downloading_jQuery [...]


Related posts:<ol><li><a href='http://mhuntdesign.com/blog/jquery/change-default-jquery-version-wordpress/' rel='bookmark' title='How to change the default jQuery version used by WordPress'>How to change the default jQuery version used by WordPress</a> <small>To override the default jQuery version called by WordPress from...</small></li>
<li><a href='http://mhuntdesign.com/blog/apple/web-design-resources-april-4th-through-april-8th/' rel='bookmark' title='Web Design Resources: April 4th through April 8th'>Web Design Resources: April 4th through April 8th</a> <small>My latest delicious bookmarks related to web design, development, drupal,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fjquery%2Flinking-to-googles-jquery-repository%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmhuntdesign.com%2Fblog%2Fjquery%2Flinking-to-googles-jquery-repository%2F&amp;source=mhuntdesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h3>jQuery Hosted on Google:</h3>
<p>Here&#8217;s the code to link to <strong>Google&#8217;s jQuery repository</strong>. It grabs the latest jQuery version.</p>
<p><code>&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;</code></p>
<h3>If you want to target a particular version of jquery:</h3>
<p><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;</code></p>
<h3><del><span><span class="tag">Google link to jQuery:</span></span></del></h3>
<p><del>You can go here <a href="http://code.google.com/p/jqueryjs/downloads/list">http://code.google.com/p/jqueryjs/downloads/list</a> for the download list and right-click copy-link location.</del></p>
<h3>Jquery CDNs</h3>
<p>Go to <a href="http://docs.jquery.com/Downloading_jQuery">http://docs.jquery.com/Downloading_jQuery</a> for a list of CDNs</p>
<p>&nbsp;</p>
<p><em>Updated: 6/14/11 12:22pm</em></p>


<p>Related posts:<ol><li><a href='http://mhuntdesign.com/blog/jquery/change-default-jquery-version-wordpress/' rel='bookmark' title='How to change the default jQuery version used by WordPress'>How to change the default jQuery version used by WordPress</a> <small>To override the default jQuery version called by WordPress from...</small></li>
<li><a href='http://mhuntdesign.com/blog/apple/web-design-resources-april-4th-through-april-8th/' rel='bookmark' title='Web Design Resources: April 4th through April 8th'>Web Design Resources: April 4th through April 8th</a> <small>My latest delicious bookmarks related to web design, development, drupal,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://mhuntdesign.com/blog/jquery/linking-to-googles-jquery-repository/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

