- icokevicius August 30, 2016 at 10:58 am
Hi, the web is http://www.llanesclinica.com/, i need change the slug “service” to “servicios”.
In general menu when i click in “servicios” all is ok, the URL is http://www.llanesclinica.com/servicios, but if i click in anyone service the URL is: http://www.llanesclinica.com/service/radiodiagnostico/ when i need this: http://www.llanesclinica.com/servicios/radiodiagnostico/
And in “Especialidades” when you go to page: http://www.llanesclinica.com/especialidades/ and you click in anyone the URL is like this: http://www.llanesclinica.com/service/medicina-de-familia/ i need to establish http://www.llanesclinica.com/especialidades/medicina-de-familia/
Thank you very much, regards.
Juanfra Aldasoro August 30, 2016 at 2:47 pmHi,
Thank you for writing. I hope you are doing well.
The “service” part of the URL is set when defining the “service” Custom Post Type.
I’m pretty sure there might be a plugin in the WordPress.org plugin repository in order to get that changed.
If not, it’s pretty simple. You can check how the menu custom post type is defined in /paeon/includes/custom-post-types/service.php
You’ll need to change the “rewrite” parameter (You can learn more here: http://codex.wordpress.org/Function_Reference/register_post_type)
Then, use something like
'rewrite' => array( 'slug' => 'whatever-you-want-instead-of-service' ),
Finally, reset your permalinks structure in “Settings > Permalinks”.
With regards to having two different slugs for the same Custom Post Type, that’s not possible unfortunately.
Best,
Juan.Juanfra Aldasoro August 31, 2016 at 1:30 pmHi,
Thanks for the follow up.
By doing that you have modified the slug for the service category taxonomy. What you need to do is change the
'slug' => true,
Present in the function add_nice_service()
Best,
Juan.Juanfra Aldasoro September 12, 2016 at 3:57 pmHi,
Thank you for the follow up.
Sorry, my bad, I meant to write rewrite instead of slug.
What you need to do is replace:
'rewrite' => true,
with
'rewrite' => array( 'slug' => 'servicios' ),
You can find that in line #32 of that file.
Please remember that this is an open forum and we only ask to mark messages as private if the person requesting for support needs to provide information such as wp login, ftp access or similar.
Thank you,
Juan.
You must be logged in to reply to this topic.