WordPress.org

Support

Support » Themes and Templates » Adding Calender and Recent Posts to template

Adding Calender and Recent Posts to template

  • Hello all,

    Forgive for us a “typical” newbie question! 🙂 I just ditched Movabletype and installed WP 1.5 with standard Kubrick template. However, the standard Calendar and “Recent Posts” index are missing from my site. Does any know how to add into the template? Thank you.

    Bill

Viewing 11 replies - 1 through 11 (of 11 total)
  • For the calendar, add this:

    <?php get_calendar(); ?>

    to the file wp-content/themes/default/sidebar.php. Where in the sidebar you put it is up to you.

    As for “Recent Posts”, that’s not a standard feature in WordPress, so what you put into that file depends on the plugin you’re using and its functions.

    Thank you. Appreciate it alot!
    Will it work if I just paste above code into style template? As mentioned above, I have very little knowledge in php programming..Sorry!

    Again thank you for your help.
    Bill

    You’ll to paste the above code into your Sidebar Template.

    As for recent posts, check out MtDewVirus’s plugins. He has some nice ones, very easy to use.

    I pasted it into my Side Bar Template and saved it. Nothing seems to be happening: No Calender yet! Is there additional codes that needs to added or should the code be in a particular line in the template. Thank you.

    MtDewVirus’s plugins looks great. I will use them. Thank you for the tip!

    Bill

    By the way, I tried use the three colum with Calender available on:
    http://www.viewfinderdesign.co.uk/images/tricolumn.jpg

    That did not work for me eithet. I msut be doing something wrong somewhere but donno where! 🙂

    Thank you.

    Bill

    For the calendar, you need to have it look like this:
    [code]
    ‘<li id=”calendar”>
    <?php get_calendar(); ?>


    [/code]

    The program needs to know that you are adding a new line to the sidebar.

    As far as recent posts go, I didn’t realize there was a plugin for it. I did my own code:

    [code]
    ‘ <li id=”recentposts”><?php _e(‘Recent Posts:’); ?>

      <?php wp_get_archives(‘type=postbypost&&limit=10’); ?>


    [/code]

    Both these chuncks need to be placed in sidebar.php.

    Oh yeah, you don’t need the [code][/code] bits or the ‘ and ‘ that surround each block of code, I’m still getting used to the board . . . 🙂

    Thank you very much! It worked very well for me. However, I would like to be able to control the number of “recent posts” that is being displayed. I am not sure if there is a default number of a post in the system that the code is just picking up. Right now, I do not have many entries on my weblog so I cannot tell weather the counting will continue or not!

    Also, I would like to be able to choose the font (bold, italics, etc) for title. Now the “recent posts” title looks different than the rest of my blog. Is there a way to do that?

    Thank you

    Your help is greatly appreciated.

    Bill Ainashe

    Oh yeah, you don’t need the [code][/code] bits or the ‘ and ‘ that surround each block of code, I’m still getting used to the board . . . 🙂

    YEs… you are right! It does not seem to work with “[code][/code] “… Thank you.

    Bill,

    Where it says limit=10, you can change that to any number you want and that will increase the number of posts displayed. I recommend that you don’t do any more than 25, if that, or your menu will be bigger than the rest of your site.

    As far as the changing title format, you’ll have to look in the css that you are using to drive the site and then look at the source of your index.php page (using the “View” Menu in IE). This will allow you to match up your tags to the conventions in the CSS.

    Thank you.
    If the default setting for the number of “recent posts” displaye is ten, then I am happy! As you said, a longer list will reduce the usuabilty of the site.

    Thank for you help. Greatly appreciated!

    Bill

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding Calender and Recent Posts to template’ is closed to new replies.
Skip to toolbar