How to add a custom id to each post URL in wordpress

I’m working on wordpress site. I use custom post type as my post type. I want to add custom id with character to post url like www.mydomain.com/g123/postname/. And i also need if i delete /postname/ part from url it must be redirect to the post www.mydomain.com/g123/postname/.

1 Answer
1

i wasn’t able to add custom id but i show the post id in url with a character like this www.mydomain.com/%category%/g%post_id%/%postname%/

Leave a Comment