Custom taxonomy gets all custom post types

Hello!

I have created a custom taxonomy to be used with a created custom post type. On my site I get the posts connected to a category, wich works fine. But when getting posts with the custom taxonomy it gets ALL posts from my custom post type, instead of just those that have the taxonomy selected.

Any ideas?

Hi @adam

Check here and ensure that you have configured frontity.settings.js to support your custom taxonomy.

I double checked the endpoint and slug and its correct.

Heres the relevant code:

postTypes: [
  {
     type: "kundcase",
     endpoint: "kundcase",
     archive: "/kundcase",
  },
],
taxonomies: [
  {
     taxonomy: "case-categories",
     slug: "case-categories",
     postTypeEndpoint: "kundcase",
  },
],

if I fetch for example state.source["case-categories"][17] I expect to only get the relevant “kundcase” posts, instead i get back ALL the posts from “kundcase”

Hi @adam

Can you provide a link to a repo with your code so we can see your code and clone your project if necessary. Is your WordPress API publicly accessible? Please see here for the kind of information that it’s useful to provide to help others to help you.

1 Like