• On about every other NEW post I make the ‘post’ section moves down but the date stays? example is here: https://wp.zanematthew.com/ I have posted the code below, this is my first wordpress theme

    <?php get_header(); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="date">
    <?php the_date('','<h2>','</h2>'); ?>
    </div>
    <div class="post" id="post-<?php the_ID(); ?>">	
    
    	<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>
    
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div>
    
    	<div class="feedback">
    		<?php wp_link_pages(); ?>
    		<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    <div class="comments">
    	<?php comments_template(); // Get wp-comments.php template ?>
    </div>
    
    </div>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>
Viewing 8 replies - 1 through 8 (of 8 total)
  • Maybe you should read a bit in the Codex about the template tags you are using in your template:
    <?php the_date('','<h2>','</h2>'); ?>
    Template_Tags/the_date

    Thread Starter Zane Matthew

    (@zanematthew)

    thank you for pointing me in the right direction, I was not sure if the php date code was in the wrong spot or if I was having css issues…I read-up on the “Template_Tags/the_date” but I am still having the same issue

    So, go back to that Codex page and read ALOUD the “Special Note” under the 1. Description.

    Thread Starter Zane Matthew

    (@zanematthew)

    ok, im lost what confuses me is that once I add edit or add another post on the same day, the date jumps back down to where it should be… :\

    Then maybe we should go back and clarify what “jumps” means. A screenshot? (naming the browser, OS etc.)

    Thread Starter Zane Matthew

    (@zanematthew)

    here is the screen shot
    https://userpages.umbc.edu/~zane1/temp/wp/wp1.gif

    OS: MAC OS X 10.4.10
    php: v 4.4.4
    mysql: 5-0.37

    what really confuses me is that when i write another post the date lines back up with the correct post…?

    That looks exactly as what I see on my computer and I already gave you the solution.
    READ it!

    Also read again your own code posted above. You have this:
    the_date <== which appears only ONCE a day
    the_title – it is there
    the_category the_author the_time
    the_content
    The code is displaying exactly what you coded in. No, the date should NOT go down as you think it should. That might be your wish… but your code says otherwise.

    what really confuses me is that when i write another post the date lines back up with the correct post…?

    This doesn’t make too much sense, sorry.

    Thread Starter Zane Matthew

    (@zanematthew)

    Moshu,

    sorry if i made you upset, you seem frustrated that i am asking such a trivial question.

    what i am asking for is help or an example, or even better…for someone to say “oh, you should of done this..” I am not looking for someone to reply with “RTFM”

    i have read what you posted but still I DO NOT UNDERSTAND IT! please, can you explain it?

    i will continue to read up on the link you provided, but please if all you are going to post is “RTFM” then please do not bother responding to my post…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Date Jumping around’ is closed to new replies.