Archive for December, 2009
Here is the code to put into the sidebar that will list, if the page or its parent has children.
<?php
if($post->post_parent) {
// there is a parent, so
$sTitle = get_the_title($post->post_parent);
$theLink = get_permalink($post->post_parent);
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->post_parent.'&echo=0');
} else {
$sTitle = get_the_title($post->ID);
$theLink = get_permalink($post->ID);
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID.'&echo=0');
}
if ($children) {
?>
<div class="widget" id="subpages">
<h2></h2>
<div class="inside-widget">
<ul>
<?php echo $children; ?>
</ul>
</div>
</div>
<?php
} // End If children
?>
put this code in before the Loop (most likely this will be a page template). In the page, you need to add a custom field called “category_id” with the id of the category.
global $post; //wordpress post global object
$thecategory = “cat=”.get_post_meta($post->ID, ‘category_id’, true);
query_posts($thecategory);
The Nyack Park Conservancy is a non-profit dedicated to building a plan and developing the Village of Nyack’s waterfront parks.
FSI designed their site from a template with custom graphics.
Programming included building a list of documents from the media files.



