Forums Forums Search & Filter Pro Date shown of the first post in the search result

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #151291

    Hello Trevor,

    I have another issue with the results. Strangely only the date of the first result is shown. I changed the php of the results template to have another order and an easier css-styling. Here is the php code I’m using. Apparantly I did something wrong with the syntax? But I can’t find the mistake yet:

    “…
    <div class=”result”>
    <h4>“><?php the_title(); ?></h4>
    <div class=”result-content”>
    <div class=”result-image”>
    <?php
    if ( has_post_thumbnail() ) {
    the_post_thumbnail(“small”);
    }
    ?>
    </div>
    <div class=”result-excerpt”>
    <?php the_excerpt(); ?> Frühestes Einstellungsdatum: <?php the_date(); ?>
    </div>
    </div>
    </div>
    …”

    Maybe you see the error?

    Thank you for your helb in advance.
    Kind regards
    Albert

    Trevor
    #151296

    Did you see my reply on your other post?

    the_date()

    becomes

    get_the_date()

    Anonymous
    #151298

    Sorry, your help in the other threat helped me solve this:

    I just had to change “<?php the_date(); ?>” to “<?php echo get_the_date(); ?>”.

    Thanks. Can be closed.

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