• Resolved sdacreative

    (@sdacreative)


    I’m not sure why this is not working, but could you please advise why the code below is not rendering the standard WordPress CPT “project” category?

    <ul class="client-list">
      <Loop type=project category=featured count=-1 orderby=name order=asc>
        <li>
          <a href="{Field url}"><Field title /></a>
        </li>
      </Loop>
    </ul>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hmm, that’s odd. When I try your markup on my site, it works as expected. Could you describe in a bit more detail what your data structure is, what you expect that your markup should output, and what it’s actually outputting?

    Here are a few suggestions to try to troubleshoot this:

    • Check that project is the actual slug for your CPT and that it’s spelled correctly
    • Check that you have project posts that have the featured category applied to them
    • Try removing count=-1. It shouldn’t hurt anything here but omitting the count attribute displays all results by default so it isn’t necessary in your case
    • Try removing the category parameter to check whether your loop is displaying project posts as expected
    • If you have other categories applied to your posts, try using a different category name in the category attribute to see if this is only an issue with your featured category or if it affects other categories too

    Let me know what you discover while you’re testing!

    Hi @sdacreative, it looks like this thread has been sitting for a while and we haven’t heard back from you so I’m going to mark it as resolved. If you’re still having issues, feel free to update the status of this thread and let me know what you discovered about the issue during your testing of the suggestions I made above. Don’t hesitate to reach back out about this or any other issues!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CPT with category not showing’ is closed to new replies.