<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel rdf:about="http://blogmarks.net/api/marks/link/3244998">
<title>Public marks on http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page</title>
<description>Public marks on http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page</description>
<link>http://blogmarks.net/marks/link/3244998</link>
<items><rdf:Seq><rdf:li resource="http://blogmarks.net/api/user/delavigne/mark/1058415178"/>
<rdf:li resource="http://blogmarks.net/api/user/mozkart/mark/1058380365"/>
</rdf:Seq></items>
</channel>
<item rdf:about="http://blogmarks.net/api/user/delavigne/mark/1058415178">
<title>WordPress page template to redirect to first child page</title>
<link>http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page</link>
<description>To achieve this recipe, you have to create a page template. Create a new file and paste the following code in it:
&lt;?php
/*
Template Name: Redirect To First Child
*/
if (have_posts()) {
  while (have_posts()) {
    the_post();
    $pagekids = get_pages(&quot;child_of=&quot;.$post-&gt;ID.&quot;&amp;sort_column=menu_order&quot;);
    $firstchild = $pagekids[0];
    wp_redirect(get_permalink($firstchild-&gt;ID));
  }
}
?&gt;</description>
<dc:date>2009-07-04T17:57:08Z</dc:date>
<dc:author>delavigne</dc:author>
<dc:subject>wordpress</dc:subject>
<content:encoded><![CDATA[<div class="mark">
<a href="http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page"><img border="0" src="http://blogmarks.net/screenshots/2009/07/04/a5917768ba432040e6e23cf6bdb14126.jpg" alt="" /></a>
<div class="xfolkentry">
<h4><a class="taggedlink" href="http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page">WordPress page template to redirect to first child page</a></h4>
 
by <a href="http://blogmarks.net/user/delavigne">delavigne</a> 
 &amp; <a class="public" href="http://blogmarks.net/link/3244998">1 other(s)</a> 
<p class="description">To achieve this recipe, you have to create a page template. Create a new file and paste the following code in it:
<?php
/*
Template Name: Redirect To First Child
*/
if (have_posts()) {
  while (have_posts()) {
    the_post();
    $pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
    $firstchild = $pagekids[0];
    wp_redirect(get_permalink($firstchild->ID));
  }
}
?></p>
<p class="tags">
<a rel="tag" class="tag public_tag" href="http://blogmarks.net/marks/tag/wordpress">wordpress</a>
</p>
<div class="action-bar">
<a href="http://blogmarks.net/my/marks,new?id=1058415178">Copy</a> | 
<a href="http://blogmarks.net/link/3244998">React (0)</a></div>
</div>
</div>
]]></content:encoded>
</item> <item rdf:about="http://blogmarks.net/api/user/mozkart/mark/1058380365">
<title>WordPress page template to redirect to first child page</title>
<link>http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page</link>
<description>To achieve this recipe, you have to create a page template. Create a new file and paste the following code in it:
&lt;?php
/*
Template Name: Redirect To First Child
*/
if (have_posts()) {
  while (have_posts()) {
    the_post();
    $pagekids = get_pages(&quot;child_of=&quot;.$post-&gt;ID.&quot;&amp;sort_column=menu_order&quot;);
    $firstchild = $pagekids[0];
    wp_redirect(get_permalink($firstchild-&gt;ID));
  }
}
?&gt;</description>
<dc:date>2009-06-20T06:33:06Z</dc:date>
<dc:author>mozkart</dc:author>
<dc:subject>wordpress</dc:subject>
<content:encoded><![CDATA[<div class="mark">
<a href="http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page"><img border="0" src="http://blogmarks.net/screenshots/2009/07/04/a5917768ba432040e6e23cf6bdb14126.jpg" alt="" /></a>
<div class="xfolkentry">
<h4><a class="taggedlink" href="http://www.wprecipes.com/wordpress-page-template-to-redirect-to-first-child-page">WordPress page template to redirect to first child page</a></h4>
 
by <a href="http://blogmarks.net/user/mozkart">mozkart</a> 
 &amp; <a class="public" href="http://blogmarks.net/link/3244998">1 other(s)</a> 
<p class="description">To achieve this recipe, you have to create a page template. Create a new file and paste the following code in it:
<?php
/*
Template Name: Redirect To First Child
*/
if (have_posts()) {
  while (have_posts()) {
    the_post();
    $pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
    $firstchild = $pagekids[0];
    wp_redirect(get_permalink($firstchild->ID));
  }
}
?></p>
<p class="tags">
<a rel="tag" class="tag public_tag" href="http://blogmarks.net/marks/tag/wordpress">wordpress</a>
</p>
<div class="action-bar">
<a href="http://blogmarks.net/my/marks,new?id=1058380365">Copy</a> | 
<a href="http://blogmarks.net/link/3244998">React (0)</a></div>
</div>
</div>
]]></content:encoded>
</item> </rdf:RDF>