Employment Types – Change?!
-
Hello Guys,
where can I change the Employment Types at the Backend?
Thank you,
warm regards,
Exitmode
-
Under Job Listings > Job Types.
Hi Adam,
No I mean the Words.
How can I change / edit the list:
– Fulltime
– Internship
….Its not in German and I only need 4-5 types.
Wp Job Manager has soo few functions to work with it.
Any thing must be coded… it’s not for normal users.
> No I mean the Words. How can I change / edit the list
You can do this under Job Listings > Job Types. Just hover over a type and click the Edit link to edit it. Screenshot:
Thanks!
Nooo i mean the Dropdown!
The dropdown isn’t editable:
Where can I edit this List?!
That is controlled here:
https://github.com/Automattic/WP-Job-Manager/blob/1.29.1/wp-job-manager-functions.php#L665-L684
You can add a new one like so:
add_filter( 'wpjm_job_listing_employment_type_options', 'akh_add_new_wpjm_employment_type' ); function akh_add_new_wpjm_employment_type( $employment_types ) { $employment_types['EXAMPLE'] = __( 'Example', 'wp-job-manager' ); return $employment_types; }
Editing or removing you can do using PHP’s
unset()
or just overwriting whatever array item you want to change.- This reply was modified 6 years, 10 months ago by Adam Heckler.
- This reply was modified 6 years, 10 months ago by Adam Heckler.
Where can I edit this to save this for upcoming updates?
I have a active Child Theme. Can I put this lines in a new file?
Iam not a Developer. I know where the lines are, but.. when I change this lines… nothing happen…
Dont know why..
Sorry – I did not found my Topic… 😀
Can I put this only in my Child Theme “functions.php” ?
How can I overwrite the delivered Employment Types or Delete completely?
- This reply was modified 6 years, 9 months ago by exitmode.
Can I put this only in my Child Theme “functions.php” ?
Yes, or you can use a plugin like Code Snippets:
https://wordpress.org/plugins/code-snippets/
How can I overwrite the delivered Employment Types or Delete completely?
To overwrite one, just add a different string to the same array element, based off the code I gave you above. Like so:
add_filter( 'wpjm_job_listing_employment_type_options', 'akh_add_new_wpjm_employment_type' ); function akh_add_new_wpjm_employment_type( $employment_types ) { $employment_types['FULL_TIME'] = __( 'Different Text', 'wp-job-manager' ); return $employment_types; }
To disable:
add_filter( 'wpjm_job_listing_employment_type_options', 'akh_add_new_wpjm_employment_type' ); function akh_add_new_wpjm_employment_type( $employment_types ) { unset $employment_types['FULL_TIME']; return $employment_types; }
I haven’t tested those myself, but they should work. If you need further help with custom code, you may want to look into one of these services for help:
https://codeable.io/?ref=l1TwZ
Thanks!
Danke Adam für deine Hilfe!
Zu deinen Tips:
Das Problem ist, dass Ihr den WP Job Manager nicht weit ausgebaut habt und diesen trotzdem jedem zur Verfügung stellt. Ihr baut Funktionen ein, die gefestigt sind und man diese auch nicht bearbeiten kann.
Also wie soll ich als normaler “Benutzer” mir mal eben was zurecht basteln?
Wenn man selbst noch Geld rein investieren muss, um den WP Job Manager auszubauen oder weiterzuentwickeln, dann solltet ihr den WP Job Manager umbenennen:
Develop Job Manager
oder
WP Job Manager – only for Developers
Oder anders: Das, was ein deutscher WP “Entwickler” / “Coder” kostet.. dafür kann ich WordPress neu entwickeln lassen…
Trotzdem Danke für deine Unterstützung, ich habe was ich brauche!
Weiter gehts in den anderen Threads.
add_filter( ‘wpjm_job_listing_employment_type_options’, ‘akh_add_new_wpjm_employment_type’ );
function akh_add_new_wpjm_employment_type( $employment_types ) {
unset $employment_types[‘FULL_TIME’];
return $employment_types;
}Errorwarning:
Deine PHP-Code-Änderungen wurden aufgrund eines Fehlers in Zeile 30 der Datei wp-functions.php zurückgesetzt. Bitte beheben und versuchen, erneut zu speichern.
syntax error, unexpected ‘$employment_types’ (T_VARIABLE), expecting ‘(‘Oops! Try this:
function akh_add_new_wpjm_employment_type( $employment_types ) { unset( $employment_types[‘FULL_TIME’] ); return $employment_types; }
Danke! =)
unset will not work!
- The topic ‘Employment Types – Change?!’ is closed to new replies.