<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Anthology of Ideas &#187; themes</title>
	<atom:link href="http://anthologyoi.com/tag/themes/feed" rel="self" type="application/rss+xml" />
	<link>http://anthologyoi.com</link>
	<description>Anthology of Ideas is an archive of thoughts and form.</description>
	<lastBuildDate>Sat, 03 Mar 2012 11:16:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Custom Category Templates on a Archive or Index page.</title>
		<link>http://anthologyoi.com/wordpress/custom-category-templates-on-a-archive-or-index-page.html</link>
		<comments>http://anthologyoi.com/wordpress/custom-category-templates-on-a-archive-or-index-page.html#comments</comments>
		<pubDate>Wed, 23 Jan 2008 21:00:01 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/custom-category-templates-on-a-archive-or-index-page.html</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>On <a href="http://anthologyoi.com/">my home page</a> and in my archives, I use a custom category template to display <a href="http://anthologyoi.com/archive/blogish/asides">asides</a> and <a href="http://anthologyoi.com/archive/news-briefs">news</a> articles. This is very easy to do and it only takes a couple seconds of work to create custom category templates in any WordPress theme. </p>
<p>The first step is to add the following to your current theme&#8217;s index.php loop after the line that looks like <span class="inline-code">&lt;?php while (have_posts()) : the_post(); ?&gt;</span>, but before any other code.<br />
<pre class="brush: php">&lt;?php $cat_temp = cat_loop();?&gt;
	&lt;?php if($cat_temp &amp;&amp; is_numeric($cat_temp)){?&gt;
		&lt;?php include(&#039;loops/cat_&#039;.$cat_temp.&#039;.php&#039;);?&gt;
	&lt;?php }else{ ?&gt;</pre></p>
<p>Then add <span class="inline-code">}</span> just before the line <span class="inline-code">endwhile</span>.</p>
<p>The next step is to add the following to your theme&#8217;s functions.php file (you may have to create a file with the same name):</p>
<p><pre class="brush: php">function cat_loop(){
	global $blog_id,$post, $wp_version;
		if($wp_version &gt;= 2.3){
			global $object_term_cache;
			$array = $object_term_cache[$blog_id][$post-&gt;ID][&#039;category&#039;];
		}else{
			global $category_cache;
			$array = $category_cache[$blog_id][$post-&gt;ID];
		}
		while (list($cat) = each($array)) {
			if(file_exists(dirname(__FILE__).&#039;/loops/cat_&#039;.$cat.&#039;.php&#039;)){
				return $cat;
			}
		}
	}</pre></p>
<p>This can be modified to look at author&#8217;s also. Now the only thing you have to do is to create a folder named &#8220;loops&#8221; in your theme&#8217;s folder, and then create a new file with a new &#8220;loop&#8221; &#8212; excluding the while and endwhile parts &#8212; and name it cat_xxx.php where xxx is the id of the category the loops is for. </p>
<p>This can be repeated for single.php, archive.php, or anywhere else a custom loop is useful. You can even use something similar for individual posts or pages.</p>
<p>A post may be in multiple categories, but it will only use the first custom template it finds, so make sure the post is in only one specially styled category at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/custom-category-templates-on-a-archive-or-index-page.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Displaying WordPress categories in a horizontal dropdown menu.</title>
		<link>http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html</link>
		<comments>http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html#comments</comments>
		<pubDate>Wed, 16 Jan 2008 18:05:51 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[drop-down menus]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html</guid>
		<description><![CDATA[One of my readers recently asked how I created my horizontal menu bar: the short answer is by mixing CSS and Javascript. The first step is to get WordPress to display the menu as a hierarchical list without a title. &#8230; <a href="http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p> One of my readers recently asked how I created my horizontal menu bar: the short answer is by mixing CSS and Javascript.</p>
<p>The first step is to get WordPress to display the menu as a hierarchical list without a title. <span class="inline-code">&lt;?php wp_list_categories(&#039;sort_column=name&amp;sort_order=asc&amp;style=list&amp;children=true&amp;hierarchical=true&amp;title_li=0&#039;); ?&gt;</span></p>
<p>We then wrap this WordPress code in the following so we can style it.<br />
<pre class="brush: php">&lt;div style=&quot;text-align:center;&quot;&gt;
    &lt;ul id=&quot;menu&quot; style=&quot;padding:0; margin:0;&quot;&gt;
        &lt;?php wp_list_categories(&#039;sort_column=name&amp;sort_order=asc&amp;style=list&amp;children=true&amp;hierarchical=true&amp;title_li=0&#039;); ?&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre></p>
<p>I added this to my header.php, but you can add it anywhere you want it to appear.</p>
<p>The CSS is fairly simple and you just need to add it to your theme&#8217;s <u>style.css</u> file.</p>
<p><pre class="brush: php">ul#menu {
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
	font-size:1.2em;
}

ul#menu li {
	float: left;
	padding: 0;
	margin: 0;
	border-right:solid 1px #fff;
}

ul#menu ul li {
	float: none;
	position: relative;
	border-bottom: 1px solid #7EAED7; /* fixes gap problem in IE */
	border-left: 1px solid #FFF;
	z-index:1000;
}

ul#menu li ul {
	margin: 0;
	padding: 0;
	display:none;
	list-style: none;
	position: absolute;
	background: #9CC;
}
ul#menu ul ul{
	margin-left: .2em;
	position: absolute;
	top: 0; /* if using borders, -1px to align top borders */
	left: 100%;
}

ul#menu * a:hover, ul#menu li a:active{
background:#7EAED7 !important;
color: #FFFFFF;
}

ul#menu li a:link,
ul#menu li a:visited,
ul#menu li a:hover,
ul#menu  li a:active{
	display: block;
	padding: .2em .3em;
	text-decoration: none;
	background: #5587B3;
	 color: #FFFFFF;
}


ul#menu ul li a:link,
ul#menu ul li a:visited,
ul#menu ul li a:hover,
ul#menu ul li a:active {
	width: 8em;
}</pre></p>
<p>Of course you will need to change the colors and text sizes to ensure it blends with the rest of the theme.</p>
<p>Now the last step is the to make it work as a drop-down list on all browsers. This could be done in Firefox with a simple CSS declaration, but Internet Explorer doesn&#8217;t understand the :hover pseudo classes, so we mimic this in Javascript.</p>
<p><pre class="brush: php">&lt;script type=&quot;text/javascript&quot;&gt;
 /*&lt;![CDATA[*/

var mbA,mbT,mbTf,mbSf;
var mbR = [];

function mbSet(m) {
if (document.getElementById&amp;&amp;document.createElement) {
	var m=document.getElementById(m);
	mbR[mbR.length] = m;
	var i;

	e=m.getElementsByTagName(&#039;a&#039;);
	if (!mbTf) mbTf=new Function(&#039;mbHT();&#039;);
	if (!mbSf) mbSf=new Function(&#039;mbS(this);&#039;);
	for (i=0;i&lt;e.length;i++) {
		e[i].onmouseout=e[i].onblur=mbTf;
		e[i].onmouseover=e[i].onfocus=mbSf;
	}

	m=m.getElementsByTagName(&#039;ul&#039;);
	for (i=0;i&lt;m.length;i++) {
		mbH(mbL(m[i]));
	}
}}

function mbHA() {
	if (mbA) {
		while (mbA) mbH(mbA);
		mbHE(&#039;block&#039;);
	}
}

function mbHT() {
	if (!mbT) mbT=setTimeout(&#039;mbHA();&#039;, 0);
}

function mbTC() {
	if (mbT) {
		clearTimeout(mbT);
		mbT=null;
	}
}

function mbS(m) {
	mbTC();
	if (mbA) while (mbA&amp;&amp;m!=mbA&amp;&amp;mbP(m)!=mbA) mbH(mbA);
	else mbHE(&#039;none&#039;);

	if (mbM(m)) {
		mbSH(m,&#039;block&#039;);
		mbA=m;
	}
}

function mbH(m) {
	if (m==mbA) mbA=mbP(m);
	mbSH(m,&#039;none&#039;);
	mbT=null;
}

function mbL(m) {
	while (m &amp;&amp; m.tagName != &#039;A&#039;) m = m.previousSibling;
	return m;
}

function mbM(l) {
	while (l &amp;&amp; l.tagName != &#039;UL&#039;) l = l.nextSibling;
	return l;
}

function mbP(m) {
	var p = m.parentNode.parentNode;
	if (p.tagName == &#039;UL&#039;) {
		var i = 0;
		while (i &lt; mbR.length) {
			if (mbR[i] == p) return null;
			i++;
		}
	} else {
		return null;
	}
	return mbL(p);
}

function mbSH(m,v) {
	m.className=v;
	mbM(m).style.display=v;
}

function mbHE(v) {
	mbHEV(v,document.getElementsByTagName(&#039;select&#039;));
}

function mbHEV(v,e) {
	for (var i=0;i&lt;e.length;i++) e[i].style.display=v;
}
/*]]&gt;*/
&lt;/script&gt;</pre></p>
<p>A couple notes on the previous code. </p>
<ol>
<li>To activate it, change your theme&#8217;s &lt;body> tag to &lt;body onload=&#8221;mbSet(&#8216;menu&#8217;);></li>
<li>It was not written by me, but I&#8217;ve been using it for a long time and don&#8217;t remember where I got it. </li>
<li>It can occasionally create a JavaScript error, and I&#8217;ve intended to rewrite it for a long time, but it usually works fine. </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html/feed</wfw:commentRss>
		<slash:comments>323</slash:comments>
		</item>
		<item>
		<title>Designing flexible WordPress themes.</title>
		<link>http://anthologyoi.com/dev/designing-flexible-wordpress-themes.html</link>
		<comments>http://anthologyoi.com/dev/designing-flexible-wordpress-themes.html#comments</comments>
		<pubDate>Wed, 29 Aug 2007 07:07:43 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[custom templates]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/dev/theme-designers-code-less-do-more.html</guid>
		<description><![CDATA[The average WordPress theme has different files for pages, single posts, archives and the front page; however, most of them are almost exactly the same except for inside the_loop. This is a quick tutorial on how to do the most &#8230; <a href="http://anthologyoi.com/dev/designing-flexible-wordpress-themes.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The average WordPress theme has different files for pages, single posts, archives and the front page; however, most of them are almost exactly the same except for inside the_loop. This is a quick tutorial on how to do the most with the fewest files, and includes a few methods to have custom templates by separating content display from structural elements.</p>
<p>WordPress looks first for special files and then defaults to the index.php file (<a href="http://wpbits.wordpress.com/2007/08/22/making-wordpress-themes-iii-template-hierarchy/">as shown in this diagram</a>). We can take advantage of this by using only an index.php file and then using conditionals to modify it. While it seems that this method would render the code less readable, it is actually far more readable, and far easier to modify.</p>
<p>Your theme should start off a header.php, footer.php, sidebar.php and an index.php. These files are <a href="http://kahi.cz/wordpress/template-structure-graphically-clearly/">the &#8220;code&#8221; files</a> and are fairly self-explanatory, and at this point the only question should be whether you add just the header portion of the file to the header.php or everything including the calls to get_sidebar()&#8212;the same goes for the footer.php depending on your theme. This depends on how you use your them, if you plan to integrate it with bbPress and use the same header and sidebars, you should add everything before the normal loop to the header. However, we will focus on things outside of the header (this includes the navigation menus and such) and just focus on <a href="http://codex.wordpress.org/the_loop">the_loop</a>.</p>
<p>A &#8220;normal&#8221; index page looks a little like this. (Taken from the default WordPress theme.)</p>
<p><pre class="brush: php">&lt;?php get_header(); ?&gt;

	&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

	&lt;?php if (have_posts()) : ?&gt;

		&lt;?php while (have_posts()) : the_post(); ?&gt;

			&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
				&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
				&lt;small&gt;&lt;?php the_time(&#039;F jS, Y&#039;) ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;/small&gt;

				&lt;div class=&quot;entry&quot;&gt;
					&lt;?php the_content(&#039;Read the rest of this entry &amp;raquo;&#039;); ?&gt;
				&lt;/div&gt;

				&lt;p class=&quot;postmetadata&quot;&gt;Posted in &lt;?php the_category(&#039;, &#039;) ?&gt; | &lt;?php edit_post_link(&#039;Edit&#039;, &#039;&#039;, &#039; | &#039;); ?&gt;  &lt;?php comments_popup_link(&#039;No Comments &amp;#187;&#039;, &#039;1 Comment &amp;#187;&#039;, &#039;% Comments &amp;#187;&#039;); ?&gt;&lt;/p&gt;
			&lt;/div&gt;

		&lt;?php endwhile; ?&gt;

		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link(&#039;&amp;laquo; Previous Entries&#039;) ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link(&#039;Next Entries &amp;raquo;&#039;) ?&gt;&lt;/div&gt;
		&lt;/div&gt;

	&lt;?php else : ?&gt;

		&lt;h2 class=&quot;center&quot;&gt;Not Found&lt;/h2&gt;
		&lt;p class=&quot;center&quot;&gt;Sorry, but you are looking for something that isn&#039;t here.&lt;/p&gt;
		&lt;?php include (TEMPLATEPATH . &quot;/searchform.php&quot;); ?&gt;

	&lt;?php endif; ?&gt;

	&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</pre></p>
<p>For most themes, the page and single pages look the same: the only part that really changes is the_loop itself, and even then the changes are usually minor, so if you want to change something outside the_loop, you have to change it in all files. However, by operating the majority of display elements out of the main files, we can make it infinitely extensible without overloading the end-user with large amounts of code to sort through.</p>
<p>The index.php file for the theme I use is very short and easily read.</p>
<p><pre class="brush: php">&lt;?php get_header(); ?&gt;
	&lt;div id=&quot;wrap&quot;&gt;

		&lt;div id=&quot;content&quot;&gt;

			&lt;?php if (have_posts()) : ?&gt;

				&lt;?php
					if(is_home()){

						include (TEMPLATEPATH . &#039;/index-loop.php&#039;);

					}elseif(is_page() || is_single()){

						include (TEMPLATEPATH . &#039;/single-loop.php&#039;);

					}else{

						include (TEMPLATEPATH . &#039;/archive-loop.php&#039;);

					}
				?&gt;

			&lt;?php else :?&gt;
				&lt;h2 class=&quot;center&quot;&gt;Not Found&lt;/h2&gt;
				&lt;?php include (TEMPLATEPATH . &#039;/not-found.php&#039;);?&gt;
			&lt;?php endif; ?&gt;

		&lt;/div&gt;

		&lt;?php get_sidebar(); ?&gt;

	&lt;/div&gt;

&lt;?php get_footer(); ?&gt;</pre></p>
<p>If we break it down: it calls the header, adds the two structural divs, and checks to see if there are any posts (of any kind). If there are no posts it includes an error page before including the sidebar, closing the divs and calling the footer. This part of the page is fairly normal and is used in most themes&#8212;not only is it used in most themes, but most of the main files all have this same code&#8211;every single theme file calls the footer, sidebar and header, shows an error message if there are no posts to display. This is a lot of wasted space. If you suddenly want to change the name of something or move the sidebars, you have to change every file which is just pointless. The difference in my index.php file is that there isn&#8217;t a full loop. It checks if there are posts using have_posts(), but where you would normally see a loop it just has some <a href="http://codex.wordpress.org/Conditional_Tags">conditional statements</a>, and for each condition, a different loop is included. </p>
<p>Each of the loops is in a different included file. (The loops are shown below, but just notice the similarities and major differences.)</p>
<p>Index loop:</p>
<p><pre class="brush: php">&lt;?php while (have_posts()) : the_post(); ?&gt;
		&lt;h2 id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; class=&quot;b&quot;&gt;
			&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt; &lt;/a&gt;
		&lt;/h2&gt;

		&lt;div class=&quot;main main_border&quot;&gt;

			&lt;small&gt;
				Posted on &lt;?php /*backslashes escape chars*/ the_time(&#039;l \t\h\e jS \o\f F, Y \a\t g:i a &#039;) ?&gt; in &lt;?php the_category(&#039;, &#039;) ?&gt; &lt;?php edit_post_link(&#039;Edit&#039;,&#039;-&#039;);?&gt;
			&lt;/small&gt;

				&lt;?php the_content(&#039;Continue reading &quot;&#039;.the_title(&#039;&#039;, &#039;&#039;, false).&#039;&quot;&#039;)?&gt;

			&lt;div class=&quot;small box&quot;&gt;
				//Some comment and UTW stuff				
			&lt;/div&gt;	
		&lt;/div&gt;
&lt;?php endwhile; ?&gt;

&lt;div class=&quot;main&quot; style=&quot;width:99%;&quot;&gt;
	&lt;div class=&quot;main-nav-left&quot; style=&quot;float:left;width:49%;&quot;&gt;&lt;?php posts_nav_link(&#039;&#039;,&#039;&#039;,&#039;&amp;laquo; Previous Entries&#039;) ?&gt;&lt;/div&gt;
	&lt;div class=&quot;main-nav-right&quot; style=&quot;float:right;width:49%; text-align:right;&quot;&gt;&lt;?php posts_nav_link(&#039;&#039;,&#039;Next Entries &amp;raquo;&#039;,&#039;&#039;) ?&gt;&lt;/div&gt;
&lt;/div&gt;</pre></p>
<p>single-loop.php (handles both singles and pages because there is only a tiny difference between the two)</p>
<p><pre class="brush: php">&lt;?php while (have_posts()) : the_post(); ?&gt;

	&lt;h2&gt;&lt;?php the_title();?&gt;&lt;/h2&gt;


	&lt;small&gt;
		&lt;?php if(!is_page()){ /*Only difference between pages and singles*/?&gt;

			Posted on &lt;?php /*backslashes escape chars*/ the_time(&#039;l \t\h\e jS \o\f F, Y \a\t g:i a &#039;) ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;in &lt;?php the_category(&#039;, &#039;) ?&gt; &lt;?php edit_post_link(&#039;Edit&#039;,&#039;-&#039;);?&gt;

		&lt;?php }else{?&gt;

			&lt;?php edit_post_link(&#039;Edit&#039;,&#039;-&#039;);?&gt;

		&lt;?php } ?&gt;
	&lt;/small&gt;

	&lt;div class=&quot;main&quot;&gt;

		&lt;?php the_content(&#039;Read the rest of this entry &amp;raquo;&#039;); ?&gt;

		&lt;?php wp_link_pages(); ?&gt;

		&lt;div class=&quot;small box&quot;&gt;

			//some comment and UTW stuff

		&lt;/div&gt;

		&lt;?php posts_nav_link(&#039; &amp;#8212; &#039;, __(&#039;&amp;laquo; Previous Page&#039;), __(&#039;Next Page &amp;raquo;&#039;)); ?&gt;

	&lt;/div&gt;

&lt;?php endwhile; ?&gt;</pre></p>
<p>And the archive-loop.php which handles categories, date archives, tags, searches etc.</p>
<p><pre class="brush: php">&lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&gt;

	&lt;?php /* If this is a category archive */ if (is_category()) { ?&gt;

		&lt;h2&gt; Reading about &lt;?php single_cat_title(); ?&gt;&lt;/h2&gt;

 	&lt;?php /* If this is a daily archive */ } elseif (is_day()) { ?&gt;

		&lt;h2&gt;Archive for &lt;?php the_time(&#039;F jS, Y&#039;); ?&gt;&lt;/h2&gt;

	&lt;?php /* If this is a monthly archive */ } elseif (is_month()) { ?&gt;

		&lt;h2&gt;Archive for &lt;?php the_time(&#039;F, Y&#039;); ?&gt;&lt;/h2&gt;

	&lt;?php /* If this is a yearly archive */ } elseif (is_year()) { ?&gt;

		&lt;h2&gt;Archive for &lt;?php the_time(&#039;Y&#039;); ?&gt;&lt;/h2&gt;

	&lt;?php /* If this is a search */ } elseif (is_search()) { ?&gt;

		&lt;h2&gt;The Search Results For &quot;&lt;?php echo $s;?&gt;&quot;&lt;/h2&gt;

	&lt;?php /* If this is an author archive */ } elseif (is_author()) { ?&gt;

		&lt;h2&gt;Author Archive&lt;/h2&gt;

	&lt;?php /* If this is a paged archive */ } elseif (isset($_GET[&#039;paged&#039;]) &amp;&amp; !empty($_GET[&#039;paged&#039;])) { ?&gt;

		&lt;h2&gt;Archives&lt;/h2&gt;

	&lt;?php } ?&gt;


	&lt;div class=&quot;main&quot; style=&quot;width:99%;&quot;&gt;
		&lt;div class=&quot;main-nav-left&quot; style=&quot;float:left;width:40%;&quot;&gt;&lt;?php previous_posts_link(&#039;&amp;laquo; Previous Entries&#039;) ?&gt;&lt;/div&gt;
		&lt;div class=&quot;main-nav-right&quot; style=&quot;float:right;width:40%; text-align:right;&quot;&gt;&lt;?php next_posts_link(&#039;Next Entries &amp;raquo;&#039;) ?&gt;&lt;/div&gt;
	&lt;/div&gt;


	&lt;?php while (have_posts()) : the_post(); ?&gt;

	&lt;h3 class=&quot;b&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link a &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;

	&lt;div class=&quot;main main_border &lt;?php echo anth::styles();?&gt;&quot;&gt;

		&lt;small&gt;
			&lt;!-- Posted &lt;?php the_time(&#039;j F Y&#039;) ?&gt;  by &lt;?php the_author() ?&gt; --&gt;
			&lt;?php if(function_exists(&#039;UTW_ShowTagsForCurrentPost&#039;)){?&gt;
				&lt;span class=&quot;utwtags&quot;&gt;Keywords: &lt;?php UTW_ShowTagsForCurrentPost(&quot;commalist&quot;) ?&gt;&lt;/span&gt;
			&lt;?php } ?&gt;
			&lt;?php edit_post_link(&#039;Edit&#039;,&#039;-&#039;);?&gt;
		&lt;/small&gt;

			&lt;?php the_excerpt() ?&gt;

	&lt;/div&gt;

&lt;?php endwhile; ?&gt;

&lt;br/&gt;

	&lt;div class=&quot;main&quot; style=&quot;width:99%;&quot;&gt;
		&lt;div class=&quot;main-nav-left&quot; style=&quot;float:left;width:40%;&quot;&gt;&lt;?php previous_posts_link(&#039;&amp;laquo; Previous Entries&#039;) ?&gt;&lt;/div&gt;
		&lt;div class=&quot;main-nav-right&quot; style=&quot;float:right;width:40%; text-align:right;&quot;&gt;&lt;?php next_posts_link(&#039;Next Entries &amp;raquo;&#039;) ?&gt;&lt;/div&gt;
	&lt;/div&gt;</pre></p>
<p>The actual loops in each of these files starts with <span class="inline-code">&lt;?php while (have_posts()) : the_post(); ?&gt;</span>, and you will notice that all the loops are similar with only a few cosmetic changes, the major difference is in the archive page which uses a large conditional block to set the title text, but this could have been done on the index.php page and used a completely different loop if you needed it.</p>
<p>Okay, so you get down to here and wonder why you haven&#8217;t heard anything new. well once we start using custom loops the possibilities are endless.</p>
<p>For example, as <a href="http://anthologyoi.com/wordpress/custom-category-templates-on-a-archive-or-index-page.html">I posted about recently</a>, on my index I use a special loop for items that are in the <a href="http://anthologyoi.com/archive/blogish/asides/">Asides category</a>, but only on the index page, so inside of my is_home) conditional statement I also add the code:</p>
<p><pre class="brush: php">&lt;?php $in_cat = cat_loop();?&gt;
	&lt;?php if($in_cat){?&gt;
		&lt;?php include(&#039;cat_&#039;.$in_cat.&#039;.php&#039;);?&gt;
	&lt;?php } ?&gt;</pre></p>
<p>Which calls the function: (added to the functions.php file)<br />
<pre class="brush: php">function cat_loop(){
	global $blog_id,$post, $wp_version;
		if($wp_version &gt;= 2.3){
			global $object_term_cache;
			$array = $object_term_cache[$blog_id][$post-&gt;ID][&#039;category&#039;];
		}else{
			global $category_cache;
			$array = $category_cache[$blog_id][$post-&gt;ID];
		}
		while (list($cat) = each($array)) {
			if(file_exists(dirname(__FILE__).&#039;/cat_&#039;.$cat.&#039;.php&#039;)){
				return $cat;
			}
		}
	}</pre></p>
<p>Basically the function loops through all the categories a post is in and if there is a custom loop for a category it uses it. This can easily be extended for author ids, name or anything else that you can test.</p>
<p>Let&#8217;s review: use as little repeated code as possible because when you do lots of tricks are available to you. </p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/dev/designing-flexible-wordpress-themes.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thoughts on Those Who Walk In Darkness by John Ridley</title>
		<link>http://anthologyoi.com/writings/books/fiction/thoughts-on-those-who-walk-in-darkness-by-john-ridley.html</link>
		<comments>http://anthologyoi.com/writings/books/fiction/thoughts-on-those-who-walk-in-darkness-by-john-ridley.html#comments</comments>
		<pubDate>Mon, 25 Dec 2006 18:22:57 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Fiction]]></category>
		<category><![CDATA[God]]></category>
		<category><![CDATA[racism]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[reviews]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/books/thoughts-on-those-who-walk-in-darkness-by-john-ridley.html</guid>
		<description><![CDATA[In the course of this article the ending of the story and many other spoilers will be revealed. This is your only warning. Taken from twbookmark.com Officer Soledad &#8220;Bullet&#8221; O&#8217;Roark loathes her nickname-and the notoriety it represents. She didn&#8217;t join &#8230; <a href="http://anthologyoi.com/writings/books/fiction/thoughts-on-those-who-walk-in-darkness-by-john-ridley.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the course of this article the ending of the story and many other spoilers will be revealed. This is your only warning.<br />
<span id="more-144"></span><br />
Taken from twbookmark.com</p>
<blockquote><p>Officer Soledad &#8220;Bullet&#8221; O&#8217;Roark loathes her nickname-and the notoriety it represents. She didn&#8217;t join L.A.P.D&#8217;s elite M-Tac squad to fight the Brass or make rookie cops idolize her. She joined M-Tac to kill freaks.<br />
Freaks, muties, metanormals-back in the day, they were called superheroes. They had amazing powers, lurid costumes, and snappy names: Nightshift, Civil Warrior, Nubian Princess, The Giggler. They seemed to be saviors and gods. But where there are heroes, there are villains. When a clash of superheroes and supervillains destroys San Francisco, the normal human population decides it will no longer live like spectators at the foot of Mt. Olympus.</p>
<p>Superhumans are now outlawed and hunted by cops. But it isn&#8217;t easy to take down beings who are invulnerable or intangible, have super-strength or super-speed, or can throw flames from their body or telepathically control minds. The mortality rate for M-Tac units is nearly fifty percent-per mission. That&#8217;s why Soledad has customized hi-tech, unauthorized, very special ammo. Each freak has a different weakness, and her color-coded clips are designed to exploit every one of them. Soon Soledad is racking up a body count that makes her a legend on the force-and a nightmare in the freak underground.</p>
<p>But when Soledad guns down a radiant woman who can heal the sick, reverse catastrophes, and then fly away on great white wings, the cop may be starting the final war between normals and metanormals. Because Bullet O&#8217;Roark didn&#8217;t just shoot down a freak. According to all witnesses, she&#8217;s killed an angel. </p></blockquote>
<p>After reading this book it is hard to find a place to start, but there are three major themes in this book if you know where to look. The first is pure racism and bigotry, the second is a warning against knee-jerk reactions (with broad sweeps towards September 11th), the third is more subtle and deals with when passion becomes insanity. The world that John Ridley paints is a stirring look into the human psyche.</p>
<p>   After the destruction of San Fransisco by a super-villain, in a knee-jerk reaction the President of the United States signs an executive order declaring that any metanormals left in the country would immediately be declared <em>personae non gratae</em> (lit. an unwelcome person) stripping of their citizenship and their very humanity. Any person so declared is served with a warrant which, although it is technically a warrant for their arrest, signals their death. The teams of specially trained police (M-Tac) serve the warrants with the intent and expectation that they will be served to a dead body.</p>
<p>   Because of the actions of a single super-villain an entire segment of the human species is declared nonhuman and treated as such. As is evident by O&#8217;Roarks second killing there is no burden of proof.  After witnessing a collapse of a street and noticing that cars were held back from plunging into the crevice, O&#8217;Roark frantically scanned the faces in the crowd to find the one person who had saved the lives of many people. Upon finding a single person without a fearful expression she drew her gun. When that person turned to leave she followed. And when the person dropped their overcoat to fly away on golden wings, O&#8217;Roark fired her gun causing the metahuman to plummet to earth ending their life in a pile of broken bones and wings. This is a world where metahumans are nothing; even one who saved lives is considered sub-human. Although interestingly enough these same sub-humans still still try to help.</p>
<p>   There are two lessons we can draw from this part of the story. The first is how deeply racism truly runs. The second is that over reacting to a catastrophe in anger and fear is easy, but dealing with the consequences is hard. </p>
<p>    The second lesson we learn is that there is a thin line before passion and insanity. O&#8217;Roark hates metahumans with a passion; she devoted her entire life to killing them efficiently to the point that she received degrees in metahuman psychology and physiology before becoming a M-Tac for no other reason than to be able to kill easier. In the course of the story she finds a single person who is her soul-mate, but when he reveals himself (while saving a woman from a burning car no less) to be a metahuman she promptly attempts to kill him emptying clip after clip from her weapon into him. It had no effect on him because he was able to become intangible, but it fueled her desire even more to find a way to kill every type of metahuman.</p>
<p>    Now one would believe that there must have been a major catastrophe in this womans life to have her hate metahumans as much as she does. However her vast hate comes from nothing more that wounded pride and broken dreams. In her own words she felt that &#8220;as a little girl they killed my dreams&#8221; because her hero let her down. She is a picture-perfect representation of a tolerated psychopath.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/writings/books/fiction/thoughts-on-those-who-walk-in-darkness-by-john-ridley.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a World- An Introduction and The Goals</title>
		<link>http://anthologyoi.com/writings/creating-a-world/an-introduction-and-the-goals.html</link>
		<comments>http://anthologyoi.com/writings/creating-a-world/an-introduction-and-the-goals.html#comments</comments>
		<pubDate>Mon, 03 Jul 2006 23:15:21 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[CaW]]></category>
		<category><![CDATA[fantasy book]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[world]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/creating-a-world/an-introduction-and-the-goals.html</guid>
		<description><![CDATA[I have always wanted to write a book. Not just any book; a good one. One that creates an entire universe and populates it; maybe not even a single book, maybe a whole series. Anyway, that&#8217;s not why this whole &#8230; <a href="http://anthologyoi.com/writings/creating-a-world/an-introduction-and-the-goals.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always wanted to write a book. Not just any book; a good one. One that creates an entire universe and populates it; maybe not even a single book, maybe a whole series. Anyway, that&#8217;s not why this whole section is here. Instead this section will create a universe. As a basic foundation it will be similar to any Fantasy book or movie you have read. There will be Elves, Dwarfs, Goblins and Dragons. Instead of creating a world defined by the genre and within a tired cliche, I will try to breath new life into the old themes; in such a way that the universe I create is unique while still be familiar and accessible.<span id="more-62"></span><br />
A little background: The world I&#8217;m going to imagine here has been knocking around my head for a long time. Actually a lot of it is stuff that came from the Arathria Chronicles game elsewhere on the site. The main reason I stopped making the game is because I knew it could not possibly measure up to the world I was creating. However through the upcoming articles I hope to be able to fully flesh out the world from the basics such as the composition of the world to the more intricate subjects such as the flow of energy and the foundations of intelligence. Hopefully I can do what I envision justice.<br />
Also filtered through the descriptive and technical articles I hope to develop my fiction writing skills and write some short stories to elaborate on the ideas I write about.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/writings/creating-a-world/an-introduction-and-the-goals.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

