Hi,
I tried fetching the posts by tag, but I couldn’t figure out how.
It will display the posts when I use this method.
<?php
$postslist = get_posts('numberposts=5&orderby=date&tag=mirpurkhas');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<?php the_title(); ?><br>
<?php endforeach; ?>
The posts are displayed, but not the exact tag posts when I use this.
<?php
$jobtag = get_field('job_tag');
$postslist = get_posts ('tag='.$jobtag.'&posts_per_page=5&orderby=date');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<?php the_title(); ?><br>
<?php endforeach; ?>
To display these posts, I am using the Custom TaxonomyTemplate.
I noticed that the custom Taxonomy Template does not display any of the fields.
Never mind, I have deleted the custom taxonomy template and am not using it anymore. Thanks