Forums Forums Search & Filter Pro Post dates not displaying in results

Viewing 3 posts - 1 through 3 (of 3 total)
  • Trevor
    #193436

    There are two ways to show dates on posts. The most commonly used shows ONLY the date on the first post of that date, then doesn’t show it on the others of that date. The other method shows it on all posts.

    Method #1 uses the function:

    <?php the_date();?>

    Method #2 uses the function:

    <?php echo get_the_date();?>

    Notice how method #2 also uses echo?

    Many functions in WordPress have differences in output, for example, the_excerpt() and get_the_excerpt().

    Anonymous
    #193503

    Thanks Trevor! I really appreciate your help here.

    It looks like the original code in the results.php, “<?php the_date();?>”, was working inconsistently as it would only pull back dates for random posts. Possibly a bug with the plugin…

    When I changed the code to “<?php echo get_the_date();?>”, all of the dates for published posts started displaying properly.

    Cheers!
    Matt

Viewing 3 posts - 1 through 3 (of 3 total)