Title: nickam's Replies | WordPress.org

---

# nickam

  [  ](https://wordpress.org/support/users/nickam/)

 *   [Profile](https://wordpress.org/support/users/nickam/)
 *   [Topics Started](https://wordpress.org/support/users/nickam/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nickam/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nickam/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nickam/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nickam/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nickam/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal error:Call to undefined function wp_is_mobile](https://wordpress.org/support/topic/fatal-errorcall-to-undefined-function-wp_is_mobile/)
 *  [nickam](https://wordpress.org/support/users/nickam/)
 * (@nickam)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/fatal-errorcall-to-undefined-function-wp_is_mobile/#post-2820357)
 * for me the problem plugin was “sitepress-multilingual-cms”… once i changed the
   name or deleted it up and running again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [List posts by taxonomy tag](https://wordpress.org/support/topic/list-posts-by-taxonomy-tag/)
 *  [nickam](https://wordpress.org/support/users/nickam/)
 * (@nickam)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/list-posts-by-taxonomy-tag/#post-1425598)
 * i found the following to work very well… it is a slight combination of code shown
   on this post and of that at [wordpress ticket #13582](http://core.trac.wordpress.org/ticket/13582).
 * the important difference is that it calls the taxonomy of a specific custom post_type.
 *     ```
       <?php
       $post_type = 'continents';
       $tax = 'countries';
       $tax_terms = get_terms($tax,'hide_empty=0');
   
       //list the taxonomy
       $i=0; // counter for printing separator bars
       foreach ($tax_terms as $tax_term) {
       $wpq = array ('taxonomy'=>$tax,'term'=>$tax_term->slug);
       $query = new WP_Query ($wpq);
       $article_count = $query->post_count;
       echo "<a href=\"#".$tax_term->slug."\">".$tax_term->name."</a>";
       // output separator bar if not last item in list
       if ( $i < count($tax_terms)-1 ) {
       echo " | " ;
       }
       $i++;
       }
   
       //list everything
       if ($tax_terms) {
         foreach ($tax_terms  as $tax_term) {
           $args=array(
             'post_type' => $post_type,
             "$tax" => $tax_term->slug,
             'post_status' => 'publish',
             'posts_per_page' => -1,
             'caller_get_posts'=> 1
           );
   
           $my_query = null;
           $my_query = new WP_Query($args);
           if( $my_query->have_posts() ) {
             echo "<h2 class=\"tax_term-heading\" id=\"".$tax_term->slug."\"> $tax_term->name </h2>";
             while ($my_query->have_posts()) : $my_query->the_post(); ?>
               <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
               <?php
             endwhile;
             echo "<p><a href=\"#top\">Back to top</a></p>";
           }
           wp_reset_query();
         }
       }
       ?>
       ```
   
 * now in my application i took the code:
    `$post_type = 'continents';` and replaced
   it with: `$post_type = $wp->query_vars["post_type"];` which will call for the
   post_type of the template i am using.

Viewing 2 replies - 1 through 2 (of 2 total)