Forums Forums Search & Filter Pro Help with displaying result of custom post type

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #220567
    This reply has been marked as private.
    Trevor
    #220587

    Could you upload the PHP template file for that page to a file sharing site and share the link for that with me so that I can look at it?

    Anonymous
    #220704
    This reply has been marked as private.
    Anonymous
    #220706
    This reply has been marked as private.
    Trevor
    #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>	
    
    ?>
    Trevor
    #220784
    This reply has been marked as private.
    Anonymous
    #220836

    Hi Trevor,

    I tried the method you’ve given and it worked! Thank you so much for your fast response and help. I appreciate it greatly.

    Problem solved, thanks!

    Trevor
    #220840

    That’s great to hear. I will close this thread for now.

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