• I have a custom page template, i have the main loop. After that i reset it and have a new for a category-menu. ( query_posts( ‘cat=’.get_field(‘id’)); ) I see all titles but it only outputs the date for the first entry.

    tom

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Tom,

    I can’t help without seeing the code. Can you paste the loop you’re using please.

    Thanks,
    Sam

    Thread Starter Tom Peak

    (@tom-peak)

    <?php while ( have_posts() ) : the_post(); ?>
    				<div class="spalte2_plain infinity"><div class="spalte2 infinity"><? the_content();?></div></div>
    				<div class="spalte1_plain infinity"><div class="spalte1 infinity"><? the_field('spalte_2');?></div></div>
    				<div class="spalte1_plain infinity"><div class="spalte1 infinity"><h2>ARTIKEL INSPIRATION:</h2><br />
    <?
            endwhile;
            wp_reset_query();
            query_posts( 'cat=16'); ?>
                <?php
                /* Start the Loop */
    
                while ( have_posts() ) : the_post();
    
                    ?>
                   <a href=" <? the_permalink(); ?> " > <div class="normal"> <? the_title(); ?> am <?php the_date(); ?></div></a> <br/>
    <?
                endwhile;
    
                ?>

    thx

    but it only outputs the date for the first entry

    the entries are possibly all from the same day;
    this is one of the peculiarities of the_date()

    http://codex.wordpress.org/Function_Reference/the_date

    Try changing the_date() to the_time() < I’ve found that fixes quite a few of this type of problem.

    Sam

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘See only the first date in the loop’ is closed to new replies.