I would like to see a list of my post's in the sidebar of the template I am using.
I searched the forums and found a few topics relating to this, the most specific one suggested editing the below code into the sidebar.php template.
I did that and nothing happened, no errors and no change to my side bar.
I would appreciate any guidance on how to get my posts to show up in the sidebar and or on the code I have attached below.
Thanks very much.
<?php require("/var/www/html/blog/wp-blog-header.php"); ?>
- <h1><?php _e('Activity'); ?></h1>
- " title="<?php the_title() ?>"><?php the_title() ?>
<!--This will show the last 10 posts, including the last one. To change the number of post shown
edit the 'nuberposts=x' to whatever value you want, and to skip the last one (or last 2, 3, etc.)
increase the value of 'offset=x' (default is "0" so it will start by the last post)-->
$posts = get_posts('numberposts=10&offset=0');
foreach ($posts as $post) :