WordPress.org

Ready to get started?Download WordPress

Forums

Change name in get_archives (3 posts)

  1. e-monk
    Member
    Posted 7 years ago #

    Hi! I want my user can select the last news from 1 week, so I put in the sidebar

    <?php get_archives('weekly', '1', 'html', '', '', TRUE); ?>

    but I want the link put "this week" not the dates like "25/June/2007–1/July/2007". Can I change the name of this link?

    Many thanks!

  2. MichaelH
    Member
    Posted 7 years ago #

    You'd need to change wp-includes/template-functions-general.php to do that (assuming that you are using version 2.0.10).

    Also please note that in WordPress version 2.2.1, get_archives is deprecated and replaced by wp_get_archives.

  3. e-monk
    Member
    Posted 7 years ago #

    Thanks, I think it would be complicated because I don´t know well php so I have decided to put a select like this:

    <select name="archivemenu" onChange="document.location.href=this.options[this.selectedIndex].value;">
    <option value="">This week</option>
    <?php get_archives('daily','7','option','','','FALSE'); ?>
    </select>

Topic Closed

This topic has been closed to new replies.

About this Topic