Forums › Forums › Search & Filter Pro › Help with displaying result of custom post type
- This topic has 8 replies, 2 voices, and was last updated 5 years, 10 months ago by
Trevor.
Viewing 8 posts - 1 through 8 (of 8 total)
-
Trevor(Private) September 11, 2019 at 3:34 pm #220782
Ah, OK.
I think you should use our Shortcode method instead. See here and also follow the guide for customising:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
Then, either edit the results.php file yourself, or contact me and I will edit the results.php file for you. I think the content needs to be like this:
if ( $query->have_posts() ) { ?> <div class="ngo-list"> <div class="table"> <table> <tr> <th>Name</th> <th>Category </th> <th>Website </th> <th>Learn More </th> </tr> <?php while ($query->have_posts()) { $query->the_post(); ?> <tr> <td><h5 class=""><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5></td> <td><?php $term = get_field('ngo_category'); echo get_term($term)->name; ?></td> <td><a href="<?php the_field('website'); ?>"><?php the_field('website'); ?></a></td> <td><a href="<?php the_permalink(); ?>">View Details</a></td> </tr> <?php } echo paginate_links(); } ?> </table> </div> </div> ?>
-
AuthorPosts
Viewing 8 posts - 1 through 8 (of 8 total)