The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created Il y a 8 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Please make sure if the CPT slug is 'companies', if it is different, replace 'companies' with appropriate slug in above code.
2) Go to edit your CPT, and add %cpt_slug% under Options -> 'Use a custom URL format' (see attached). And save your CPT.
The second step will prepend $cpt_slug% in place of companies (i.e. hidden link) and the first step will filter the permalink (in case a companies CPT post is visited), for %cpt_slug% and will strip it off the permalink.
Please let me know if this solution works for you or not.
And remember to update your permalink settings under Dashboard -> Settings -> Permalinks. You don't need to change anything here, just click the 'Save Changes' button and it should flush and updated the rewrite table.
Then try again, if it works or not. Please let me know thanks.
Can you please give a try to a 3rd party plugin for managing the redirections (i.e. 301 Redirects and etc)? Since your requirements are around custom URL handling, other than the scope of Types, a 3rd party plugin may help.
You may also try custom URL Rewriting in .htaccess. Following articles may be of some help: