I need a php snippet for Wordpress - WP Job Manager plugin
- or -
Post a project like this2351
$30
- Posted:
- Proposals: 2
- Remote
- #1764345
- Completed
Description
Experience Level: Intermediate
General information for the website: Wordpress job site
Description of requirements/features: I need a custom code snippet written for WP Job Manager plugin for Wordpress.
This code snippet would change the default permalink structure of the WP Job Manager output listings.
Here is an example of similar permalink snippets: https://wpjobmanager.com/document/tutorial-changing-the-job-slugpermalink/
Unfortunately none of these works for my requirement, but it can serve as a reference as well as this other example: https://gist.github.com/mikejolley/7718889
I am using the WP Job Managers's native "Job Types" taxonomy (job_listing_types) and I have created 2 job type terms within this taxonomy. These terms are: 'Restaurants' and 'Hotels'
By default, the native permalink structure looks like this:
example.com/jobs/my-restaurant-listing-post
and
example.com/jobs/my-hotel-listing-post
As you can see, both listings will have the same URL base /jobs/ in the permalink regardless of what job_listing_type (Restaurants, Hotels) was selected.
I would like to change this default structure, so instead of the default /jobs/ base, I would like to dynamically print the name of the job_listing_type term that was selected from the taxonomy.
So the final URL should look like this:
example.com/restaurants/my-restaurant-listing-post ( if 'Restaurants' job type was selected )
and
example.com/hotels/my-hotel-listing-post ( If 'Hotels' was selected as a listing type )
So basically I'd like to end up with the following taxonomy structure:
example.com/%job_listing_type%/%postname%
No plugins, just a simple snippet in the functions.php
Extra notes:
Description of requirements/features: I need a custom code snippet written for WP Job Manager plugin for Wordpress.
This code snippet would change the default permalink structure of the WP Job Manager output listings.
Here is an example of similar permalink snippets: https://wpjobmanager.com/document/tutorial-changing-the-job-slugpermalink/
Unfortunately none of these works for my requirement, but it can serve as a reference as well as this other example: https://gist.github.com/mikejolley/7718889
I am using the WP Job Managers's native "Job Types" taxonomy (job_listing_types) and I have created 2 job type terms within this taxonomy. These terms are: 'Restaurants' and 'Hotels'
By default, the native permalink structure looks like this:
example.com/jobs/my-restaurant-listing-post
and
example.com/jobs/my-hotel-listing-post
As you can see, both listings will have the same URL base /jobs/ in the permalink regardless of what job_listing_type (Restaurants, Hotels) was selected.
I would like to change this default structure, so instead of the default /jobs/ base, I would like to dynamically print the name of the job_listing_type term that was selected from the taxonomy.
So the final URL should look like this:
example.com/restaurants/my-restaurant-listing-post ( if 'Restaurants' job type was selected )
and
example.com/hotels/my-hotel-listing-post ( If 'Hotels' was selected as a listing type )
So basically I'd like to end up with the following taxonomy structure:
example.com/%job_listing_type%/%postname%
No plugins, just a simple snippet in the functions.php
Extra notes:
Jan O.
100% (35)Projects Completed
9
Freelancers worked with
9
Projects awarded
57%
Last project
18 Mar 2020
Australia
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies