There is light in this world
A healing spirit more powerful
Than any darkness we may encounter
Mother Teresa
/**
Gets tags used on the page
*/
$postID = get_the_ID();
$theTags = wp_get_post_tags($postID);
if ( count($theTags) > 0 ) {
$primary = $theTags[0];
$firstTag = $primary->term_id;
//echo $firstTag;
//echo $primary->term_id;
$output = $primary->name;
//Get all pages with primarry(first) term.
$args = array(
'post_type' => 'page',
'tag__in' => $firstTag,
'posts_per_page' => -1,
);
$query = new WP_Query( $args );
$count = 0;
if ( is_page() ) {
if ( have_posts() ) {
?>