I have the following code, and basically want it to display the term's slug in the data-type="HERE" part. This is on a static html page outside of the wordpress installation.
I have it displaying the custom post types as a list, but can't get it to display the terms from the taxonomy of 'categories'.
Any help would be greatly appreciated!
Many thanks
I have it displaying the custom post types as a list, but can't get it to display the terms from the taxonomy of 'categories'.
Code:
<?php $args = array( 'post_type' => 'case_study' ); ?>
<?php require($_SERVER['DOCUMENT_ROOT'] . '/news/wp-load.php'); query_posts($args ); if (have_posts()) : while (have_posts()) : the_post(); ?>
<li data-id="id-<?php the_ID(); ?>" data-type="DISPLAY TAXONOMY OF CATERGORIES TERMS HERE">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('case-study-thumb'); ?>
<?php the_title(); ?>
</a>
</li>
<?php endwhile; ?>
<?php else: ?>
<li>No Case Studies found</li>
<?php endif; ?>
Any help would be greatly appreciated!
Many thanks