title: Function result converts to IDs instead of title
body: <p>First of all, that's my code:</p>
  
  <pre><code>&lt;?php list_tax_of_project(); ?&gt;
  
  
  
  
  
  function list_tax_of_project($id = '', $title = '', $taxonomy = 'project_category', $class = '') {
  
          $class = 'list-categories';
          if ($class = 'skill') $class = 'list-skill';
  
          $terms = get_the_terms($id, $taxonomy);
          if ($terms &amp;&amp; !is_wp_error($terms)): ?&gt;
              &lt;h3 class="title-content"&gt;&lt;?php
              printf($title); ?&gt;&lt;/h3&gt;
              &lt;div class="list-require-skill-project list-taxonomires list-&lt;?php
              echo $taxonomy; ?&gt;"&gt;
                  &lt;?php
              the_taxonomy_list($taxonomy, '&lt;span class="skill-name-profile"&gt;', '&lt;/span&gt;', $class); ?&gt;
              &lt;/div&gt;
              &lt;?php
          endif;
      }
  </code></pre>
  
  <p>I'm calling the function list_tax_of_project and I want the result to be the name of the project category on this instance, and it works OK for the first page out of the paginated list on the website page in question, but when you click on page 2 of the paginated lists, the list_tax_of_project function result gets converted to the ID of the categories instead of their titles.</p>
  
  <p>You can check it out live as it happens here: <a href="https://consult.law/projects/" rel="nofollow noreferrer">https://consult.law/projects/</a> . When you click on page 2 from the paginated list at the bottom of the page, the category section will get converted to numbers.</p>
  
  <p>How can I stop this and make it stay with the title instead of converting to IDs? Thanks!</p>