<?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>MoonKat Creations &#187; WordPress</title>
	<atom:link href="http://www.moonkatcreations.com/category/wordpress-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.moonkatcreations.com</link>
	<description>Web design, front-end development</description>
	<lastBuildDate>Thu, 12 May 2011 18:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Different template for different category, single post</title>
		<link>http://www.moonkatcreations.com/web-design/wordpress-development/different-template-for-different-category-single-post/</link>
		<comments>http://www.moonkatcreations.com/web-design/wordpress-development/different-template-for-different-category-single-post/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 02:18:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=450</guid>
		<description><![CDATA[To use a different template for a particular category, just create another template page named category-nameofyourcatetory.php. WordPress automatically picks up on it. It&#8217;s a little more complicated to assign a different single post template for a particular category. In single.php, &#8230; <a href="http://www.moonkatcreations.com/web-design/wordpress-development/different-template-for-different-category-single-post/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To use a different template for a particular category, just create another template page named category-nameofyourcatetory.php. WordPress automatically picks up on it.</p>
<p>It&#8217;s a little more complicated to assign a different single post template for a particular category. In single.php, paste this code:</p>
<pre>&lt;?php
 $post = $wp_query-&gt;post;
 if (in_category('mynewcategory')) {
 include(TEMPLATEPATH.'/single-mynewcategory.php');
 } else{
 include(TEMPLATEPATH.'/single-default.php');
 }
?&gt;</pre>
<p>single-mynewcategory.php is of course the category for which you would like a different single post template, whereas single-default.php is where you would put the normal single.php code.</p>
<p>If you would like to assign numerous single post templates, use this code:</p>
<pre>&lt;?php
$post = $wp_query-&gt;post;
if(in_category('mynewcategory')) {
include(TEMPLATEPATH.'/single-mynewcategory.php');
} elseif (in_category('mynewcategory2')) {
include(TEMPLATEPATH.'/single-mynewcategory2.php');
} elseif (in_category('portfolio')) {
include(TEMPLATEPATH.'/single-portfolio.php');
} else {
include(TEMPLATEPATH.'/single-default.php');
}
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/wordpress-development/different-template-for-different-category-single-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show only post excerpts on twentyten homepage</title>
		<link>http://www.moonkatcreations.com/web-design/wordpress-development/show-only-post-excerpts-on-twentyten-homepage/</link>
		<comments>http://www.moonkatcreations.com/web-design/wordpress-development/show-only-post-excerpts-on-twentyten-homepage/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 05:12:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=419</guid>
		<description><![CDATA[This solution is simple, but requires a modification to a template page. In loop.php, change this line: to this: That&#8217;s it. Will work like a charm.]]></description>
			<content:encoded><![CDATA[<p>This solution is simple, but requires a modification to a template page.</p>
<p>In loop.php, change this line:</p>
<p><code><&#63;php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. &#63;></code></p>
<p>to this:</p>
<p>That&#8217;s it. Will work like a charm.<br />
<code><br />
<&#63;php if ( is_archive() || is_search() || is_home() || is_front_page() ) : // Only display excerpts for archives and search. &#63;></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/wordpress-development/show-only-post-excerpts-on-twentyten-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding jQuery to WordPress</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 00:11:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=217</guid>
		<description><![CDATA[You could add your custom jQuery to Wordpress by using the script tag in your head template, but this method can cause conflicts with JavaScript in other Wordpress plugins.

Instead, use the wp_enqueue_script, the Wordpress-friendly method. You will need direct access to your Wordpress files. <a href="http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You <em>could</em> add your custom jQuery to WordPress by using the script tag in your head template, but this method can cause conflicts with JavaScript in other WordPress plugins.</p>
<p>Instead, use the wp_enqueue_script, the WordPress-friendly method. You will need direct access to your WordPress files.</p>
<ol>
<li>Go into wp-content/plugins, and create a new javascript folder.</li>
<li>In this folder, place your .js file.</li>
<li>In header.php, before &lt;?php wp_head(); ?&gt;, place this:</li>
</ol>
<pre>&lt;?php
wp_enqueue_script('custom',
'/' . PLUGINDIR . '/javascript/yourscript.js',
array('jquery'),
'1.0' );
?&gt;</pre>
<p>That&#8217;s it. You don&#8217;t need to do anything additional to include the jQuery library, since it&#8217;s specified as in the array as a file that your script is dependent upon. In place of &#8216;jquery&#8217; you can use Scriptaculous, jQuery UI Tabs, or any number of libraries that are built into WordPress.</p>
<p>Those libraries, as well as additional information about the wp_enqueue_script can be found at <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">codex.wordpress.org/Function_Reference/wp_enqueue_script</a>.</p>
<p>According to the codex, this script can&#8217;t be placed above &lt;?php wp_head(); ?&gt;, but I&#8217;ve found that on the contrary, it works ONLY when placed above it. This same page of the codex also says that &#8216;$&#8217; can be used instead of &#8216;jQuery&#8217; inside the document ready function, which is also currently not accurate.</p>
<p>In other words, where you would use &#8216;$&#8217; in your jQuery function, you MUST use &#8216;jQuery&#8217; for every instance, not just in the document ready function. Feel free to test this with your own script; I&#8217;m not sure why the Codex is wrong on these points.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

