
Originally Posted by
dtkguy
You'll need to do some manual editing of files.
First go to your themes folder, copy/paste the index.php file and rename it to home.php Wordpress will uses this new home.php to take precedence for the front page only.
Next you'll need to paste the following
before The Loop begins :
PHP Code:
<?php
$today = getdate();
query_posts('year=' .$today["year"] .'&monthnum=' .$today["mon"] .'&day=' .$today["mday"] );
?>
For wordpress 1.5-2.8, The Loop starts here :
PHP Code:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
And that should hopefully do what you wanted.
Be sure to always backup files before trying anything new to your sites in case something goes wrong.
Hi,
Thank You for the info.
But you lost me after rename to home.php That I got.
Where am I to place the two codes? Just anywhere?
Here is a copy of my index.php Did not want to guess and mess things up.
Thanks
Butterflies Forever
Sami
SideNote: If I get sick or miss a day with this code will the ft page be blank?
Code:
<?php get_header(); ?>
<!-- Content -->
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Post -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-title">
<div class="post-date">
<span><?php the_time('d') ?></span>
<?php the_time('F') ?>
</div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
Author: <?php the_author() ?> / Category: <?php the_category(', ') ?>
</div>
<div class="post-entry">
<?php the_content('Read more...'); ?>
</div>
<div class="post-info">
<?php comments_popup_link('Comments (0)', 'Comment (1)', 'Comments (%)'); ?> : <a href="<?php the_permalink() ?>#respond">Add Comment</a>
</div>
</div>
<!-- /Post -->
<div class="clear"></div>
<?php endwhile; ?>
<?php else : ?>
<!-- Post -->
<div class="post">
<div class="post-title">
<h2 class="not-found-title">Not Found</h2>
</div>
<div class="post-entry not-found-entry">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
<div class="post-info"></div>
</div>
<!-- /Post -->
<?php endif; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Gossip') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Gossip »') ?></div>
</div>
<div class="clearer"> </div>
</div>
<!-- /Content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Bookmarks