rendered paste body</div> <div id="sidebar"> <h2 class="rss"><a href="http://imediatech.biz/category/sidenotes/feed/">Sidenotes</a></h2> <?phpglobal $imedia_home, $sidebar_num_posts, $sidebar_cat_id; $posts = get_posts('numberposts=' . $sidebar_num_posts . '&category=' . $sidebar_cat_id . '&orderby=post_date&order=DESC'); // We only want the posts from the sidebar category if ($posts) : foreach ($posts as $post) : setup_postdata($post); ?> <div class="sidenote"> <p class="meta"><?php the_time('F j, Y'); ?></p> <h3><a href="<?php $urlfrommeta = get_post_meta($post->ID, 'url', TRUE); $urlparts = @parse_url($urlfrommeta); if ($urlparts['scheme'] && $urlparts['host']) echo htmlspecialchars($urlfrommeta); else the_permalink(); ?>"><?php the_title(); ?></a></h3> <?php the_content('read more'); ?> </div> <?php endforeach; ?> <a id="previousnotes" href="http://imediatech.biz/category/sidenotes/">Previous Sidenotes</a> <?php else : echo "<div class='sidenote'>\nSorry, but there are no sidenotes posts to display.\n</div>\n"; endif;?> <h2>Categories</h2> <ul><?php wp_list_cats('optioncount=0&hide_empty=0&exclude=' . $sidebar_cat_id); ?> </ul> <h2>Archives</h2> <form id="archiveform" action=""> <select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);"> <option value=''>Select Month</option><?php wp_get_archives('format=option'); ?> </select> </form> </div>