Skip to content
View functions.php
<?php
/**
* Filter for fields before filtering based on $filter value
*
* Filter syntax is `job_manager_field_editor_get_fields_pre_filter_{$field_group}` ... replace {$field_group} with field group
*
* Job Fields: job_manager_field_editor_get_fields_pre_filter_job
* Company Fields: job_manager_field_editor_get_fields_pre_filter_company
* Resume Fields: job_manager_field_editor_get_fields_pre_filter_resume_fields
*
View functions.php
add_filter( 'job_manager_upload_dir', 'my_custom_job_manager_upload_dir' );
function my_custom_job_manager_upload_dir( $job_manager_uploading_file ) {
// This is the default below
// $dir = 'job-manager-uploads/' . $job_manager_uploading_file;
// This is using a custom directory, make sure to add $job_manager_uploading_file to the end of the string
$dir = 'custom_jm_uploads/' . $job_manager_uploading_file;
View functions.php
<?php
add_action( 'job_manager_field_editor_save_custom_field_end', 'update_my_custom_tax_field_editor_fields', 10, 5 );
/**
* Update Listing job_category from job_category_dentist taxonomies
*
* REQUIRES: WP Job Manager Field Editor 1.4.2+
*
* This can be useful if you want to set the Job Category but for some reason have that field hidden,
* disabled, or set to not show for a specific package, but still want the category set (or maybe you want
View functions.php
<?php
/*
* Save/Update Listing when Save/Update from Frontend
*/
add_action( 'job_manager_update_job_data', 'smp920_update_my_fields', 100, 2 );
function smp920_update_my_fields( $job_id, $values ){
// Check for value in $_POST, then set var with sanitized value, CHANGE my_input_name to the NAME used in the input HTML element
$my_input_name = isset( $_POST['my_input_name'] ) ? sanitize_text_field( $_POST['my_input_name'] ) : false;
View wp-dropdown-posts.php
<?php
// Exit if accessed directly
if( ! defined( 'ABSPATH' ) ) exit;
if( ! function_exists( 'wp_dropdown_posts' ) ) {
/**
* Create dropdown HTML content of posts
*
View content-single-job_listing-company.php
<?php
/**
* Single view Company information box
*
* Hooked into single_job_listing_start priority 30
*
* @since 1.14.0
*/
View functions.php
<?php
/**
*
* WARNING: this only checks if the email is being sent to the same email as admin_email option.
* If for some reason another email is sent to that same email address, but it's not meant as an "admin email"
* this filter will still add those additional emails, just something to keep in mind.
*/
add_filter( 'wp_mail', 'my_custom_to_admin_emails' );
View content-single-job_listing.php
<?php
$sh_indoor_outdoor = get_job_field( 'indoor_outdoor' );
if( is_array( $sh_indoor_outdoor ) && ! empty( $sh_indoor_outdoor ) ){
foreach( $sh_indoor_outdoor as $value ){
// This switch statement checks the value to see what the class needs to be set to
// for the icon based on the value. You can add more by copy paste the "case" code block
View content-single-job_listing.php
<?php
$field_values = get_custom_field( 'field_meta_key' );
if( ! empty( $field_values ) ){
// The default in code below is to output a line break HTML (<br />) after each item,
// if you want to use something else or different HTML, just replace <br /> below
View functions.php
<?php
// https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
function xyz_custom_orderby( $query_args ) {
// Use meta_value_num for numeric sorting (if issues with meta_value)
$query_args[ 'orderby' ] = 'meta_value';
$query_args[ 'order' ] = 'ASC';
return $query_args;
}
add_filter( 'job_manager_get_listings_args', 'xyz_custom_orderby', 99 );
Something went wrong with that request. Please try again.