• Resolved Kelsey

    (@kelseyfrizzell)


    Hi there. I am trying to show posts from custom post type “project” and also filter by category, so show only projects with the category “hidden-potential”. When I use the custom post type parameter, it works fine, but when I add in the category or category-id parameter no projects are pulled in at all, and it’s just blank (even though the category slug and IDs were correct). Is this not possible with the plugin (it seems like it should be?) or am I missing something? Thank you so much!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Are you sure the ‘category’ taxonomy has been added to your custom post type? My guess is you have a custom taxonomy, like ‘project-category’, so you should use a taxonomy query instead: https://displayposts.com/2019/01/07/taxonomy-queries/

    Thread Starter Kelsey

    (@kelseyfrizzell)

    Hi Bill,

    Thanks for the tip. Unfortunately that is still not working. I am using the following:

    [display-posts taxonomy=”project_category” tax_term=”hidden-potential”]

    However it’s coming up blank again. If I remove the tax_term portion, it just shows all posts which makes me think the taxonomy portion is not working. Any ideas?

    https://www.jasmine-roth.com/blog/directory/

    Plugin Author Bill Erickson

    (@billerickson)

    Can you link to the specific category archive from which you’d like to pull posts? I can then try and help you figure out the correct taxonomy and term names.

    For instance, if you are trying to lists posts from here ( https://www.jasmine-roth.com/blog/category/hidden-potential-s1/ ), you could use:

    [display-posts category=”hidden-potential-s1″] or [display-posts taxonomy=”category” tax_term=”hidden-potential-s1″]

    Another way you can help is to take a screenshot of the page in the WordPress admin where you can edit all the terms in your project category taxonomy. Make sure you include the URL because that’s where I’ll be able to see the actual taxonomy name.

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

The topic ‘Custom Post and Category Not Working’ is closed to new replies.