WordPress.org

Forums

Adding Calender and Recent Posts to template (12 posts)

  1. Somalipundit
    Member
    Posted 10 years ago #

    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

  2. Kafkaesqui

    Posted 10 years ago #

    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.

  3. Somalipundit
    Member
    Posted 10 years ago #

    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

  4. satoshi
    Member
    Posted 10 years ago #

    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.

  5. Somalipundit
    Member
    Posted 10 years ago #

    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

  6. Somalipundit
    Member
    Posted 10 years ago #

    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

  7. m7csat
    Member
    Posted 10 years ago #

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

  8. '
    [/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.

  • m7csat
    Member
    Posted 10 years ago #

    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 . . . :)

  • Somalipundit
    Member
    Posted 10 years ago #

    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

  • Somalipundit
    Member
    Posted 10 years ago #

    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.

  • m7csat
    Member
    Posted 10 years ago #

    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.

  • Somalipundit
    Member
    Posted 10 years ago #

    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

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.