Forums Forums Search & Filter Pro Custom Search Result Display Issues

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #32126

    I am trying to display my Thumbnail and my Excerpt next to each other, but I can only seem to get them to display one above the other, here is my existing code:

    <?php the_excerpt(); ?>
    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(‘thumbnail’);

    How do I get them to display with the thumbnail on the left?
    Also, how do I adjust the “featured image” (thumbnail) image that is posting to the permilink of the post? I would prefer it not display there at all.

    Thank you for your help, I hope this isn’t too off topic for this forum.

    Ross Moderator
    #32242

    Hey Ian

    This is a little out of scope of support – this questions is really about customizing WordPress templates.

    You will need to change some of the html structure, and use CSS in order to update the look of the search results.

    However, it looks like that <p> is making the post thumbnail appear underneath the excerpt rather than on the same line. I would probably also swap the two around.

    Something like this:

    <?php
        if ( has_post_thumbnail() ) {
            the_post_thumbnail('thumbnail');
        }
        the_excerpt(); 
    ?>

    (untested)

    To build your templates you really should be looking at the WordPress template tags:

    https://codex.wordpress.org/Template_Tags

    It contains explanations of functions like the_post_thumbnail

    Thanks

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