Skip Navigation

[Resolved] Custom type custom permalinks doesn’t work as expected

This support ticket is created 4 years, 5 months 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

This topic contains 7 replies, has 2 voices.

Last updated by WeiS2074 4 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#1659915

I have created a custom type archive, I put this page on the menu. when I click on it the URL is hidden link, and the page shows below:
Bad Request
Your browser sent a request that this server could not understand.
to a single custom type page, the URL is hidden link
In the custom type I set the Rewrite-> Use a custom URL logic-> enter /mytype/%post_id% in the textbox

Please ignore the above question. It is solved. I un-tick "Rewrite", then it works.
But here is another question. Why my custom type page URL is hidden link, it doesn't follow my custom URL format /mytype/%post_id%

#1661103

Hello and thank you for contacting the Toolset support.

This URL does not respect your permalinks structure because the post is still a draft, the final URL will be built when the post is published(statuses: published, private) or scheduled(status: future). As long as it is a draft WordPress will keep its URL with the scheme domain.com/mycpt=post-slug

I hope this answers your question. Let me know if you have any other questions.

#1661751
capture3.JPG

When I save it, it become "Published" immediately.
If I login as Administrator, the URL will be hidden link
If I login as Author, the URL will be hidden link

Please change the issue title to "Custom type custom permalinks doesn't work as expected".

#1664649

My apologies for the late reply, but I do not work on Sundays and Mondays.

On my test installation, I run a test on a new form and the results were different, I got the following permalink after publishing the post /mytypes/cred-auto-draft-f528764d624db129b32c21fbca0cb8d6-4/

Please check if this issue appears after saving permalinks and when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the incompatibility is produced.

If this does not help to find the root cause of this issue, I'll need to take a copy of your website for further debugging locally. We prefer Duplicator packages as explained https://toolset.com/faq/provide-supporters-copy-site/
Please use filter to reduce the size of the copy as described in this video around 1:00 hidden link
If Duplicator fails to create a copy, we'll need a database copy/export, plugins, and theme folders, all in a zip file.

#1672063

Thank you for the Duplicator copy, I successfully built the copy locally and I was able to figure out the issues.
- Permalinks placeholders such as "%post_id%", if you need to use them, you will have to add custom code. Check this StackOverflow question https://wordpress.stackexchange.com/questions/315266/custom-post-type-permalink-without-day-and-or-postname
- You have entered a custom rewrite base for your custom post type but the rewrite is not activated, you will have to activate as suggested in the following screenshot hidden link

I hope this helps. Let us know your feedback.

#1680485
Capture13.JPG
Capture12.JPG

The link doesn't help me to find the answer, it set day month year. However I want to set the set post_id.
1.do you have specific documentation for this?
2. I set back the permalinks as WordPress default, but the file name still "CRED Auto Draft Brandon characters".

#1682963

My apologies for the late reply, but I do not work on Sundays and Mondays.

1.do you have specific documentation for this?
Actually, we don't have documentation about permalinks, and I could not find any on WordPress.org, about custom post types permalinks. But you can still use a 3rd party plugin to generate custom permalinks for your custom post types. A plugin such as https://wordpress.org/plugins/custom-post-type-permalinks/
Check this article hidden link

2. I set back the permalinks as WordPress default, but the file name still "CRED Auto Draft Brandon characters".
This is the default title from Toolset Forms, If you would like to have a different title, either add a title field to the form or create a custom title by hooking to the form actions such as "cred_before_save_data" "cred_save_data", read more about it here https://toolset.com/documentation/programmer-reference/cred-api/

I hope this answers your questions. I remail at your disposal.

#1688015

My issue is resolved now. Thank you!