want to see my posts in the sidebar? (3 posts)

  1. silsurf
    Posted 8 years ago #

    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"); ?>

  2. <!-- Activity -->
      <h1><?php _e('Activity'); ?></h1>
      <!--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) :

    • " title="<?php the_title() ?>"><?php the_title() ?>
    • <?php

  3. <!-- End of Activity -->

  • vkaryl
    Posted 8 years ago #

    Maybe search for "matt's asides"? Seems like that plugin might do what you want more painlessly....

  • silsurf
    Posted 8 years ago #

    Thanks, I give it a whirl.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic