Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // output quick links list of countries
- $terms = get_terms('apptypes');
- if (count($terms)) {
- echo "<h3>Quick links</h3>";
- echo "<p style=\"text-align:center;\">";
- }
- $i=0; // counter for printing separator bars
- foreach ($terms as $term) {
- $wpq = array ('taxonomy'=>'apptypes','term'=>$term->slug);
- $query = new WP_Query ($wpq);
- $article_count = $query->post_count;
- echo "<a href=\"#".$term->slug."\">".$term->name."</a>";
- // output separator bar if not last item in list
- if ( $i < count($terms)-1 ) {
- echo " | " ;
- }
- $i++;
- }
- if (count($terms)) {
- echo "</p>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement