Why can't i have preview images in searchresult in new version?
-
I need Thumbnails of Images in the search result. Why it don’t go? My Code in Wp search.php :
<?php if ($post->post_type == 'attachment'): ?> <section class="media image"> <a class="fancyimg" rel="fancygallery" href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image($post->ID, 'thumbnail', 0); ?></a> <a class="fancyimg fancycaption" rel="fancygallery" href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php the_title(); ?></a> </section> <?php else : ?>
But i get no preview 🙁 Must i edit the functions.php or relevanssi plugin code for pictures in the search result? Please give me introductions how can i fix it….Thanks
- The topic ‘Why can't i have preview images in searchresult in new version?’ is closed to new replies.