Site logo

Archived topic

Navigate single posts using WP Core taxonomies for CPT

17 replies · Started by Eva on November 9, 2021

Viewing posts 1–15 of 18

Hi,
Using CPT UI I created the custom post type Portfolio. I created a content template for my single portfolio items, using the Block Elements module and Dynamic Data. Still a very simple set up, but wow, it's great!!
The only thing I would like is, to be able to navigate my single posts and add categories. I am using WP Core taxonomies for my Portfolio items because I need to use the same categories for my blog items. Is there a way I can change /category to /portfolio?
I hope I made myself clear, I find it quite hard to explain this.
Thank you!
Eva

Hi Eva,

Is there a way I can change /category to /portfolio?

I'm not sure I fully understand your question. Can you explain a bit more with some more related links ?

Let me know :)

Hi Ying,

Thank you for getting back to me. I will try to explain again, as I said... kind of hard :-)
Anyhow, I am using the same categories for my portfolio items as for my blog posts. The result is that the links to portfolio items in the same categories don't work, because they go to /categories/item instead of portfolio/item. Do I need to make custom categories for my CPT or can this be resolved in an easier way?
I hope my question is more clear now.
Thank you!
Eva

Thanks again, David.
I have installed the Child theme and moved the archive.php there. So, that's all set.
But... I can't get the block element working...
Can you help me with it?

I appreciate it.
Thank you

Hi Eva,

But… I can’t get the block element working…
Can you help me with it?

Were you able to set the Display Rule Location? That part is crucial. It tells the Block element where to apply.

You'll have to set the custom post type's archive page as the block element's display rule location. :)

Hi!
Unfortunately, it doesn't work. I can't find what's wrong. I have created a temporary account and hope you can take a look.

Thank you!
Eva

I checked /portfolio url to view the archive. And i can see the Content Template being applied. What am i missing?

Hi David,

I don't know. That's what I don't understand... What to do now?!

Hi Eva,

I checked the element - content template (portfolio item) that assigned to portfolio > all portfolio, the design more like for portfolio archives but not single portfolio, am I right?

But seems you haven't activated the archive for portfolio, so there's such option portfolio archives in the location dropdown list.

You'll need to activate the portfolio archive first in the CPT UI plugin:
https://www.screencast.com/t/1GMOvSrw

Then change the location of the element to the archive of portfolio not the single portfolio.

Let me know if you need further assistance :)

Hi Ying,

Actually the design is meant for single portfolio items, like (see link below). It works for the blog items (see link below also).
I activated the portfolio archive anyhow, but I don't see any difference.

I am sorry for this, hope it can be resolved.
Thank you!

If its for the Single Portfolio item then the Display Rule Location needs to be: Portfolio

This archived topic is closed to new replies.