Results 1 to 10 of 10

Thread: Wordpress Front Page Help

  1. #1
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    697
    Thanked 293 Times in 221 Posts

    Wordpress Front Page Help

    Hi,

    Is there a way to show just that days post on the ft page?

    Plugin or code or something.

    I know how to set the # shown That is not what I want.

    Some day I make 6 posts to the blog some days only 2.

    I would like the ft page to show only the posts for the day or the last 24hrs.

    Any way to do this.

    Thanks in Advance.

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  2. #2
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    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.

  3. Thanked by:

    Sami4u (15 October, 2009), Will.Spencer (15 October, 2009)

  4. #3
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    697
    Thanked 293 Times in 221 Posts
    Quote Originally Posted by dtkguy View Post
    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() ?> &nbsp;/ &nbsp;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 (%)'); ?> &nbsp;: &nbsp;<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('&laquo; Older Gossip') ?></div>
                <div class="alignright"><?php previous_posts_link('Newer Gossip &raquo;') ?></div>
            </div>
    <div class="clearer">&nbsp;</div>
            </div>
            <!-- /Content -->
            
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  5. #4
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by Sami4u View Post
    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 rel="nofollow" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                        Author: <?php the_author() ?> &nbsp;/ &nbsp;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 (%)'); ?> &nbsp;: &nbsp;<a rel="nofollow" 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('&laquo; Older Gossip') ?></div>
                <div class="alignright"><?php previous_posts_link('Newer Gossip &raquo;') ?></div>
            </div>
    <div class="clearer">&nbsp;</div>
            </div>
            <!-- /Content -->
            
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    1. Press Ctrl+F.
    2. Enter this code into the text box now displayed:
    PHP Code:
    <?php if (have_posts()) : ?>
    3. Copy and paste this code above the code displayed above:
    PHP Code:
    <?php 
    $today 
    getdate();
    query_posts('year=' .$today["year"] .'&monthnum=' .$today["mon"] .'&day=' .$today["mday"] );
    ?>

  6. Thanked by:

    Sami4u (15 October, 2009), Will.Spencer (15 October, 2009)

  7. #5
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    697
    Thanked 293 Times in 221 Posts
    HI,

    Need HELP BIG TIME!!!!

    Hi hit ctrl + before I could hit the F the screen is now huge fonts are about 2 inches Big.

    I turned the computer off and restarted it's the same way.

    How do I get this fixed!!!!!

    Some one PLEASE HELP.

    Butterflies Forever

    Sami

    PS..As far as the code help. Can someone just Please Place it were it belongs or say sample say Insert code here.

    Thanks
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  8. #6
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by Sami4u View Post
    HI,

    Need HELP BIG TIME!!!!

    Hi hit ctrl + before I could hit the F the screen is now huge fonts are about 2 inches Big.

    I turned the computer off and restarted it's the same way.

    How do I get this fixed!!!!!

    Some one PLEASE HELP.

    Butterflies Forever

    Sami

    PS..As far as the code help. Can someone just Please Place it were it belongs or say sample say Insert code here.

    Thanks
    Press Ctrl + -

    "+" means "and," not that you are required to press "+." Cheers, you should be able to Ctrl + F now. You have to learn sometime, I guess (so I won't do it for you - but I will help troubleshoot).

  9. Thanked by:

    Sami4u (15 October, 2009)

  10. #7
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    697
    Thanked 293 Times in 221 Posts
    Hi,

    Got it Whooo. Thanks. I was scared I would half to pay more money at the computer shop.

    How was I suppose to know "+" means and?

    In the future How should I make posts or ask questions? I really do want to learn. But people need to give me step by step here!

    Now next step.

    ctrl F does nothing NO box opens. That I can see anywhere? or did I mess something else up now?

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  11. #8
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by Sami4u View Post
    Hi,

    Got it Whooo. Thanks. I was scared I would half to pay more money at the computer shop.

    How was I suppose to know "+" means and?

    In the future How should I make posts or ask questions? I really do want to learn. But people need to give me step by step here!

    Now next step.

    ctrl F does nothing NO box opens. That I can see anywhere? or did I mess something else up now?

    Butterflies Forever

    Sami
    What browser are you using? In Firefox, a toolbar should display at the bottom of the page saying "Find."

  12. Thanked by:

    Sami4u (15 October, 2009)

  13. #9
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    697
    Thanked 293 Times in 221 Posts
    Quote Originally Posted by Charles View Post
    What browser are you using? In Firefox, a toolbar should display at the bottom of the page saying "Find."
    Hi,

    Found it, got it, placed code

    I was looking for a pop up window to open.

    Thank you so much!

    Still this question.

    If I get sick or miss a day with this code will the ft page be blank?

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  14. #10
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by Sami4u View Post
    Hi,

    Found it, got it, placed code

    I was looking for a pop up window to open.

    Thank you so much!

    Still this question.

    If I get sick or miss a day with this code will the ft page be blank?

    Butterflies Forever

    Sami
    Probably.

    But... What you can do is schedule some posts to be posted later.

Similar Threads

  1. Replies: 6
    Last Post: 28 December, 2010, 07:32 AM
  2. [WTB] Front-Page Digg Service
    By Kovich in forum Services
    Replies: 16
    Last Post: 18 April, 2010, 12:51 PM
  3. Wordpress Page Help
    By Sami4u in forum Wordpress
    Replies: 11
    Last Post: 19 December, 2009, 22:50 PM
  4. Replies: 4
    Last Post: 10 November, 2009, 03:01 AM
  5. Website is on First page on Front Page.
    By irahat in forum Promoting
    Replies: 0
    Last Post: 30 August, 2009, 13:49 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •