im creating a wordpress query for custom taxonomy. However im unable to get the last post that i queried to go to the permalink. Please could somebody help me get this query right, much appreciated in advance.
<?php
/*
Template Name: taxonomy-slug
*/
?>
<?php get_header(); ?>
<?php $loop = new WP_Query( array( 'post_type' => 'business', 'town' => 'cpt-cuisine', 'posts_per_page' => -1 ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<ul data-role="listview" data-theme="c" data-inset="false">
<li>
<a href="<?php the_permalink(); ?>">
<img style="margin-left: 0px; height: 65px;" alt="sample" src="<?php the_field('business_logo'); ?>" align="left"/>
<h2><?php the_title(); ?></h2>
<p><?php the_field('business_slogan'); ?></p></a>
</li>
</ul>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php get_footer(); ?>
kind regards