Support » Developing with WordPress » get_day_link and the_time (problems)

  • i’m trying to get a link to the archives based on a specific post day. for some reason using the get_day_link function with the_time does not work and gives strange results.

    <?php echo get_day_link('2007','05','22'); ?><br/>
    the above works perfectly, as it should with the dates hard-coded.

    <?php echo the_time('Y'); ?>
    <?php echo the_time('m'); ?>
    <?php echo the_time('j'); ?><br/>
    the above 3 return the correct date of the post. 2007 05 22

    <?php echo get_day_link(the_time('Y'),the_time('m'),the_time('j')); ?><br/>
    the above however refuses to work and returns a link for the current date.

    what am i doing wrong?

  • The topic ‘get_day_link and the_time (problems)’ is closed to new replies.