<?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>a cognitive dissident! &#187; php file</title>
	<atom:link href="http://www.bartros.nl/archives/tag/php-file/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bartros.nl</link>
	<description></description>
	<lastBuildDate>Wed, 24 Mar 2010 16:16:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>the wordpress loop and the Idiots demise!</title>
		<link>http://www.bartros.nl/archives/51</link>
		<comments>http://www.bartros.nl/archives/51#comments</comments>
		<pubDate>Fri, 08 Feb 2008 10:25:54 +0000</pubDate>
		<dc:creator>themainentity</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[the blog]]></category>
		<category><![CDATA[the net]]></category>
		<category><![CDATA[3xxx]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[modding]]></category>
		<category><![CDATA[new template]]></category>
		<category><![CDATA[php file]]></category>
		<category><![CDATA[php template]]></category>
		<category><![CDATA[template name]]></category>
		<category><![CDATA[video category]]></category>
		<category><![CDATA[video links]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bartros.nl/?p=51</guid>
		<description><![CDATA[Well I always had an inkling of suspicion about it but, today its official&#8230;..I am an idiot  !
Last week I decided to start a new page with some Video Links, but I really wanted to seperate these from my main page. So in short I wanted to post but I didnt want it to [...]]]></description>
			<content:encoded><![CDATA[<p>Well I always had an inkling of suspicion about it but, today its official&#8230;..I am an idiot <img src='http://www.bartros.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> !</p>
<p>Last week I decided to start a new page with some Video Links, but I really wanted to seperate these from my main page. So in short I wanted to post but I didnt want it to show on the main page but on a page called Video. Sounds easy enough right ? It seemed like a really nice thing to do, post to a different page, and keep your main page nice and lean.</p>
<p>After searching the Wordpress Codex I came to the conclusion that, Just like always I was trying something that had been attempted but was as clear cut as I thought it would be. The main page is a loop and you cant really include and exclude certain posts from just the dashboard only. So it was time to go under the Dash and so some Modding to just give it a term. Some people posted questions about it at the Wordpress forums, only to be called noob. I really didn&#8217;t want to stirr the nest, and just quietly read the posts, followed the links and advice. After testing some methodes I came to the conclusion that most ways didnt work with the Wordpress 2.3xxx Update. Bummer.</p>
<p>Should I have given up?&#8230;.I generally dont so not this time either. Pushing onwards with my Search, I can across the Advanced Category Excluder. Currently at 1.06 release and it is found <span style="color: #800000"><strong><a href="http://advanced-category-excluder.dev.rain.hu/" target="_blank" title=" http://advanced-category-excluder.dev.rain.hu">here</a></strong></span>.  With this I  would be able to If i posted something in the Video category, to exclude it from my main page&#8230;.but even better also exclude other things from the search and the archives. But then I still was left with an Invisible post. How to make it appear on the other page.</p>
<p>I decided to look up some stuff about the Wordpress loop that pulls the entries you have filled in and whom are saved to your Database. Aaah ok lets make a new template (fill in the code that tells the php file that it is a template. It goes a little like this:</p>
<pre>
&lt; ?php/*

Template Name: the name of the page</pre>
<pre>*/?&gt;</pre>
<p>What I did was put this in a edited copy of the index.php file that is located in the WP-content/themes/theme that you are using folder and put the template code there (same as I did with my archive and search pages). My theme was is a edited version of Blue box which I called Red Tokyo <img src='http://www.bartros.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . The index.php is needed for the wordpress loop that calls the entries. I did this cos this way I didnt need to open a browser even, but was able to do all this with my total commander only and the notepad that is linked there. Alternatively you could use the code in the codex at wordpress.org <span style="color: #800000"><strong><a href="http://codex.wordpress.org/The_Loop" target="_blank" title="http://codex.wordpress.org/The_Loop">here</a></strong></span>.</p>
<p>Having done that I thought well lets go back to the ACE dash and exclude all category posts for the new Video page except the Video cat, which i excluded from home. Ace works with a nice dashboard thingy that shows up in the plugins activation page. From here you can activate categories on tages with a easy checkbox and save methode. Very nice really. But well there was a search page, a home an archive page. But no Video page yet. Hmmmm. Ok lets look at the code.</p>
<pre>global $targets;

$targets =</pre>
<pre>array('is_home'=&gt;'Home','is_search'=&gt;'Search',</pre>
<pre>	'is_video'=&gt;'video');foreach ($targets as $key=&gt;$val)

{

    add_option("ace_categories_".$key,'</pre>
<pre>   ',"Category Excluder for ".$val,true);

}</pre>
<p>Well knowing that the pages are identified by ID I figured if i called my page video that adding &#8216;is_video&#8217;=&gt;&#8217;video&#8217; to the array would neatly add it and make the browser understand to exclude all the categories on my copied main page called video. But it didn&#8217;t. And here is my idocity. Case Sensitive&#8230;.I called my page Video. With a capital. Not video without. Duh!! After having changed this it worked. But cos I didnt get to work I went to the American Book store and bought all their books on Wordpress cos I was pissed that it didnt work. LOL</p>
<p>Nice books though <img src='http://www.bartros.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>pc</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bartros.nl/archives/51/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
