WordPress.org

Ready to get started?Download WordPress

Forums

archives: update readme (10 posts)

  1. TigerDE2
    Member
    Posted 11 years ago #

    Hi!
    I think you should update the readme where it deals with the archive.
    It's still described as it was used in b2.
    By the way: Which parameters is the new function taking?
    Thanks.
    Christian

  2. orbert
    Member
    Posted 11 years ago #

    Christian:
    The docs are being completely revamped (including the readme).
    See the docs section.
    >> Which parameters is the new function taking?
    Which new function, specifically?

  3. TigerDE2
    Member
    Posted 11 years ago #

    The archives...
    get_archives();

  4. orbert
    Member
    Posted 11 years ago #

    Tiger:
    Sorry if that seems like an obvious question, I'm still new to WordPress,
    so I didn't know about get_archives().
    I took a look at the code (for 0.7.1) , and here's what I found:
    get_archives( $type, $limit )
    $type should be one of: 'monthly', 'daily', 'weekly', or 'postbypost'.
    If you don't specify, it will be taken from the option settings.
    $limit is (I _think_) a limit to the number of archive links returned.
    If you want to use a limit, specify a positive integer (1, 2, 3, etc.).
    If you don't specify it, it defaults to blank (the same as ''), which
    means "no limit." (My explanation of $limit is based on my $limited
    understanding of the wp code, so I may be wrong. If in doubt, leave
    it blank.)

  5. ludvig87
    Member
    Posted 10 years ago #

    I want to link my archives, and Ive simply just made a new page, put in the archives code - but maybe not the right one..
    <?php include ("header.php"); ?>
    <?php get_archives('postbypost') ?>
    <?php include ('footer.php'); ?>
    Is the code correct or have I dont something wrong?

  6. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    That should be fine as long as you're including blog.header.php somewhere.

  7. ludvig87
    Member
    Posted 10 years ago #

    But I dont have that..
    Where should I include it?
    And how much of it?

  8. ludvig87
    Member
    Posted 10 years ago #

    <?php include ("header.php"); ?>
    <?php /* Don't remove these lines, they call the b2 function files ! */
    $blog = 1;
    require_once('blog.header.php');
    require_once($abspath.'wp-links/links.php');
    // not on by default: require_once($abspath.'wp-links/links.weblogs.com.php');
    ?>
    <?php get_archives('postbypost') ?>
    <?php include ('footer.php'); ?>
    Is this code ok or?

  9. ludvig87
    Member
    Posted 10 years ago #

    Yes it is.. Its just a bit slow in the loading of the blogs.. But thats ok.. Thanks Allusion :)

  10. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    No prob bob.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.