Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

search results to display images

Discussion in 'Troubleshooting & How-To's' started by vampyregod, Jun 19, 2017.

  1. vampyregod

    New Member

    Jun 19, 2017
    Likes Received:
    I have a taxonomy field for my images, and I have implemented a search which displays the proper content based on the keywords used, but the content is listed as a link to the file attachment page. I want the results page to display thumbnails that link to the media file, so that I can have a search result page that displays a lightbox gallery of images.

    <header class="entry-header">
            <?php the_titlesprintf'<h2 class="entry-title">
             <a href="%s" rel="bookmark">'
    esc_urlget_permalink() ) ), '</a></h2>' ); ?>

            <?php if ( 'post' === get_post_type() ) : ?>
                <div class="entry-meta">
                    <?php aza_posted_on(); ?>
                </div><!-- .entry-meta -->
            <?php endif; ?>
        </header><!-- .entry-header -->

    <article id="post-<?php the_ID(); ?>"
    <?php post_class(); ?>>
        <div class="entry-content">
            <?php the_excerpt(); ?>
        </div><!-- .entry-summary -->

        <footer class="entry-footer">
            <?php aza_entry_footer(); ?>
        </footer><!-- .entry-footer -->
    </article><!-- #post-## -->

Share This Page

Monarch Social Sharing Plugin