<?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>altrugon.com &#187; Wordpress</title>
	<atom:link href="http://www.altrugon.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.altrugon.com</link>
	<description>El blog de altrugon</description>
	<lastBuildDate>Tue, 09 Feb 2010 22:40:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Get the top parent page in WordPress</title>
		<link>http://www.altrugon.com/php/get-the-top-parent-page-in-wordpress/</link>
		<comments>http://www.altrugon.com/php/get-the-top-parent-page-in-wordpress/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 04:38:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.altrugon.com/wpblog/2007/03/20/get-the-top-parent-page-in-wordpress.html</guid>
		<description><![CDATA[A couple of days ago I found myself with the issue of getting the top parent of any page (that one which doesn&#8217;t have any father), so after look in WordPress documentation I found a nice function called get_page_hierarchy() and also no documentation about it. Without documentation about the function it was going to be [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I found myself with the issue of getting the top parent of any page (that one which doesn&#8217;t have any father), so after look in WordPress documentation I found a nice function called <strong>get_page_hierarchy()</strong> and also no documentation about it. <span id="more-27"></span>Without documentation about the function it was going to be a little bit tricky to know wheter or not this was what I was looking for, so I decided create my own function to receive the <em>post_name</em> of the top parent page. As soon I started I realized that my knowledges about recursivity were a little bit rusty, but I got it &#8230; <img src='http://www.altrugon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here is the code:</p>
<pre><code>&lt;?php
//return the name of the top parent page base on a page_id
function getTopParentPostName($myid){
	$mypage = get_page($myid);

	if ($mypage-&gt;post_parent == 0){
		return $mypage-&gt;post_name;
	}
	else{
		return getTopParentPostName($mypage-&gt;post_parent);
	}

}?&gt;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.altrugon.com/php/get-the-top-parent-page-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Categories without submit button</title>
		<link>http://www.altrugon.com/wordpress/categories-without-submit-button/</link>
		<comments>http://www.altrugon.com/wordpress/categories-without-submit-button/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 04:33:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.altrugon.com/wpblog/2007/03/20/categories-without-submit-button.html/en/</guid>
		<description><![CDATA[Well one of the reason for the early launch of this blog is what you are looking for right now, the plugin that displays your categories without that anoying submit button, so it&#8217;s more that fair that this plugin be the first post in this blog. How this work It works exactly in the same [...]]]></description>
			<content:encoded><![CDATA[<p>Well one of the reason for the early launch of this blog is what you are looking for right now, the plugin that displays your categories without that anoying submit button, so it&#8217;s more that fair that this plugin be the first post in this blog.</p>
<p><span id="more-26"></span></p>
<h2>How this work</h2>
<p>It works exactly in the same way that <a href="http://codex.wordpress.org/Template_Tags/wp_dropdown_categories">wp_dropdown_categories()</a> function. I only have added the &#8220;onchange&#8221; argument to the original function to make possible the use of the <a href="http://www.w3schools.com/jsref/jsref_onchange.asp">onchange()</a> event, and the obligatory form because the original function doesn&#8217;t include it.</p>
<p>Values accepted by &#8220;onchange&#8221;:</p>
<ul>
<li>0 = It won&#8217;t use <a href="http://www.w3schools.com/jsref/jsref_onchange.asp">onchange()</a> event</li>
<li>1 = It will use <a href="http://www.w3schools.com/jsref/jsref_onchange.asp">onchange()</a> event</li>
</ul>
<h2>Instalation and configuration</h2>
<ol>
<li>Download <a href="http://www.altrugon.com/wp-content/uploads/2009/01/altrugon_dropdown_categories.zip">altrugon_dropdown_categories.zip</a></li>
<li>Unzip the file</li>
<li>Place the folder <strong>altrugon_dropdown_categories</strong> in your directory wp-content/plugins</li>
<li>Activate the plugin</li>
<li>Paste this line in your code: &lt;?php altrugon_dropdown_categories(’onchange_submit=1′); ?&gt;</li>
<li>Enjoy</li>
</ol>
<h2>Versions</h2>
<ul>
<li>v1.2: Add an empty option. This is necessary when you don&#8217;t have a submit button.</li>
<li>v1.1: Fix the validation XHTML issue. I have enclosed the select box inside a div which also has a class.</li>
</ul>
<p>Well, that&#8217;s all. If you have any question or suggestion don&#8217;t hasitate to contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altrugon.com/wordpress/categories-without-submit-button/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>
