url rewriting – Custom slugs with dates & IDs on Custom Post Type

Question

Trying to do something with the rewrite argument on custom post types.

I’m after 2 different things here for 2 different custom post types.

1: Slugs which look like this

post-name-year-month-day

So the URL will be something like

.com/post-type-1-slug/post-name-year-month-day

2: More or less the same but with the ID

post-name-id

So the URL will be something like

.com/post-type-2-slug/post-name-id

I’m sure this is pretty easy to do

0
robwatson_dev 1 month 2023-02-18T07:29:12-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse