rendered paste body<!-- begin r_sidebar --> <div id="sidebar"> <ul id="r_sidebarwidgeted"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?> <li id="Services"><?php$querystr ="SELECT $wpdb->posts.* FROM $wpdb->postsWHERE $wpdb->posts.post_status = 'publish'AND $wpdb->posts.post_type = 'page'AND $wpdb->posts.post_parent > '0'ORDER BY $wpdb->posts.post_date DESC";$pageposts = $wpdb->get_results($querystr, OBJECT);?><?php if ($pageposts): ?><?php foreach ($pageposts as $post): ?><?php setup_postdata($post); ?><ul><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></ul><?php endforeach; ?><?php else : ?><ul> Not Found</ul><?php endif; ?></li> <li id="News"> <h4>News</h4> <ul> <?php get_archives('postbypost', 10); ?> </ul> </li> <h4>Search News</h4> <div class="search"> <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="s" id="s" value=""/><input type="submit" value="Search" id="searchsubmit"/></form> </div> <li id="Archives"> <h4>Monthly News Archives</h4> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li id="Admin"> <h4>Site Admin</h4> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </li> <?php endif; ?> </ul> </div><!-- end r_sidebar -->