Hello there!
Since WP Job Manager version 1.27.0, the job permalinks can be changed inside Settings -> Permalinks, under the Optional section.
While we cannot help with customization support (the docs you linked are developer level docs, for informational purposes) we can certainly test them in our end to see if there’s something off.
Can you let us know the exact snippet you’re pasting in functions.php and what outcome URL you’re willing to get?
Hi Gabriel,
I saw they can be changed on Permalink section. But I need the categories to be “dynamic”.
I have animal categories (dogs, cats…) and when I submit a new listing from “cats” category I want the URL to be:
webpage.com/cats/catname
The same with dogs:
webpage.com/dogs/dogname
I cant use the Settings>Permalink area because I dont need a “category” word, I need to place the category in which the animal is in. If I just place “category” there I am achieving this:
webpage.com/category/catname
webpage.com/category/dogname
This is the snippet I’m using: http://prntscr.com/ksaiii
It is as in the documentation, and I am not getting any results. Just the Settings>Permalink area settings are being aplied.
Hi @crwhntt
What you see in your testing is expected. Note that job listings in WP Job Manager default to the permalink ‘jobs’, and this job base
permalink structure is what you can change via the snippets in our documentation.
However with the snippets above you won’t be able to make the job base
permalink structure “dynamic”, as it has to be the same for all the jobs and it won’t work otherwise. You need a “static” base structure were all jobs will fallback.
This means you won’t be able to do something like:
– webpage.com/cats/catname
– webpage.com/dogs/dogname
Because would be different base job structures. But has to be something like:
– webpage.com/animals/cats/catname
– webpage.com/animals/dogs/dogname
Using for example the tutorial on https://wpjobmanager.com/document/tutorial-changing-the-job-slugpermalink/ > Adding the category to the base URL
I hope is clarified 🙂
Best,
Hi Gabriel,
My bad, thats exactly what I am trying to achieve:
– webpage.com/animals/cats/catname
– webpage.com/animals/dogs/dogname
As you can see on the 39th line of code snippet I’m using: 'animales/%category%'
The job base is “animales”, its also placed on the permalink settings. If you enter to my website you can see the base structure.
Adding the category to the base URL
is exactly the code snippet I’m using on my site and not working.
Hi @crwhntt
Be sure everything is changed as follows:
– Only using the snippet under https://wpjobmanager.com/document/tutorial-changing-the-job-slugpermalink/ > Adding the category to the base URL
(not other modifications, like permalink settings, or custom rewriting).
– Change the line 39 (in your case) to $args['rewrite']['slug'] = 'animales/%category%';
– Save again the permalinks under Settings > Permalinks
Once this is done, permalinks should be overwritten alright. Just in case and to be extra sure I tested this on my end here: https://storetestingbusiness-staging-domain-001.blog/animales/test-job/google-structure-data-test-job/ , where you can see how the job base has been changed to “animales” and then the category and the name of the job can be found.
If after these changes still doesn’t work, you’re most likely experiencing a conflict with other piece of code or plugin, and we’re unable to provide support for that.
I hope it helps!
I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!