List articles for other post_type like blog page for posts


#1

Hi,
I want to use categories links to list other posts_types, but it only works for categories from “post” post_type. How can I do it for categories out of “posts” type?

My goal is to show all projects from sydney-toolbox “projects” post_type, listed as articles too, using the slug. Because the single-page of the projects shows category, but clicking on it says that nothing is found.

Thank you,
Daniel Pereira


#2

Hello Daniel,

By default WordPress gives https://yoursite.com/post-type-slug URL for any public post type. For projects, you have https://yoursite.com/projects. If it returns not found, probably plain permalink enabled in the permalinks config (see Settings > Permalinks).

To display a projects link to your menu, you can use Custom Links option in the menu administration panel (Appearance > Menus).

Regards,
Kharis


#3

I actually think that permalinks are ok. When I create a post_type it shows the single of that post, but the archive shows the “no content” part. Maybe because it is filtering only “posts” types, it seems like.

EDIT: I realized that isn’t showing on search too, but I don’t want either, just made me think that the custom post type are ignored. But it shows the woocommerce products post_type.


#4

Ok, I was testing this on a blank wordpress file and it’s working. It might conflict with the “Polylang” plugin, because I’m using a category for different languages.


#5

So it’s solved if I start to giving languages to customs post type on the “Polylang” settings and then using it.

Sorry for bother, I never thought about that because “wordpress/category/post_name” for the posts was working fine.

Thank you for response anyway.