Skip Navigation

[Resolved] Setting custom slug path

This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.49 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 3 voices.

Last updated by Christian 7 years ago.

Assisted by: Minesh.

Author
Posts
#573458

Tell us what you are trying to do? make a slug for custom posts that isn't the default.

Is there any documentation that you are following? no

Is there a similar example that we can see? no

What is the link to your site? upwithpeople.org/upbeat-news

I need to make the custom post live at /alumni/upbeat-news/ not upbeat-news

This is very important.

#573522

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Types supports one option to rewrite the post type slug. There is rewrite option available with CPT:
=> Edit your post type
=> Navigate to "Options" section
=> Under Rewrite option - click on "Use a custom URL format" and you can add your custom slug there.

I hope that above option will fulfill your requirement. If above option does not work , following are a few links, which may help you achieving this, please have a look:

Plugin: https://wordpress.org/plugins/rewrite/
WP Plugins Repository Search: https://wordpress.org/plugins/search.php?q=url+rewrite

Few Articles that may help you:
1. hidden link
2. http://code.tutsplus.com/articles/using-wordpress-for-web-application-development-available-features-part-6-url-rewriting-or-routes--wp-34326
3. hidden link

For your custom URL rewrite requirement, I would suggest contacting our certified partners.
=> https://toolset.com/consultant/

#573886

That doesn't work. Once you do that the posts are fine, but the archives don't work.

I'm not really satisfied with an answer telling me to go pay someone to do this simple task.

#574049

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I do not have any issue to guide you. I've couple of ways that may help you.

1)
You may try to disable the has_archive from your custom post type settings and create a page that works as your post type archive where you should list the content using views.

2)
Use custom rewrite rule to fulfill your requirement. Following link may help you:
=> https://wordpress.stackexchange.com/questions/229665/custom-rewrite-rules-for-archive-page-and-single-post
=> https://wordpress.stackexchange.com/questions/219391/custom-post-type-archive-page-url-to-point-to-page-permalink

Also, I will file a discuss this with our Dev team to include a feature request that rewrite rule should also be applicable to post type archive not only posts.

#578609

Christian
Supporter
cpt-custom-slug.png

Hi,

Christian here, Types developer.

Minesh contacted me for this feature request, but it's already possible...

To change the custom slug of an archive page you have to use the input after the "has_archive" checkbox on the custom post type edit page.

Here a screenshot of how your setup should look like to have the custom slug for both, single and archive, view.

Have a nice weekend,
Christian