terms, $wpdb->term_taxonomy
WHERE $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id
AND $wpdb->term_taxonomy.taxonomy = ‘season’
ORDER BY year + 0 DESC, FIELD(season,’Winter’,’Spring’,’Summer’,’Fall’) DESC
“;
$result = $wpdb->get_results($sql, OBJECT);
foreach ($result as $season) {
$i=0;
?>
} } } echo “ |
}
}
?>
terms
WHERE $wpdb->terms.slug = ‘”. $show . “‘
“;
$result = $wpdb->get_row($sql, OBJECT);
echo “
” . $result->name . “
“;
$sql = ”
SELECT *
FROM $wpdb->term_taxonomy
WHERE $wpdb->term_taxonomy.term_id = ‘”. $result->term_id. “‘
AND $wpdb->term_taxonomy.taxonomy = ‘show’
“;
$result = $wpdb->get_row($sql, OBJECT);
echo “
” . $result->description . “
“;
$args=array(
‘show’ => $show,
‘post_type’ => ‘post’,
‘posts_per_page’ => 10,
‘caller_get_posts’=> 1,
‘orderby’ => ‘grade’,
‘order’ => ASC
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
?>