This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function limit_excerpt($length){ | |
return 5; | |
} | |
add_filter('excerpt_length', 'limit_excerpt', 999); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Place any new code below this line */ | |
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' ); | |
function custom_submit_job_form_fields( $fields ) { | |
// Here we target one of the job fields and change it to Single-select | |
$fields['job']['job_category']['type'] = "term-select"; | |
// And return the modified fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add Category List To Listing Data. | |
*/ | |
add_filter( 'listify_get_listing_to_array', function( $data, $listing ) { | |
// Default value for categories. | |
$categories = array(); | |
// Get post terms for listing categories. | |
$terms = get_the_terms( $listing->get_object(), 'job_listing_category' ); | |
// Check if term exists. | |
if ( $terms && ! is_wp_error( $terms ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_listify_single_job_listing_actions_after() { | |
global $post; | |
echo '<a href="' . $post->METAKEYGoesHere . '" class="button">' . $post->METAKEYGoesHere . '</a>'; | |
} | |
add_filter( 'listify_single_job_listing_actions_after', 'custom_listify_single_job_listing_actions_after' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add your own function to filter the fields | |
add_filter( 'submit_resume_form_fields', 'custom_submit_resume_form_fields' ); | |
// This is your function which takes the fields, modifies them, and returns them | |
function custom_submit_resume_form_fields( $fields ) { | |
// Here we target Candidate Experience and make it Optional. | |
$fields['resume_fields']['candidate_experience']['required'] = false; | |
// And return the modified fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' ); | |
function custom_submit_job_form_fields( $fields ) { | |
$fields['job']['job_location']['required'] = true; | |
// And return the modified fields | |
return $fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function output() { | |
global $post; | |
if ( ! function_exists( 'sharing_display' ) ) { | |
return; | |
} | |
$buttons = sharing_display( '' ); | |
if ( '' == $buttons ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change the return value to the default number of stars you wish to display. | |
function editDefaultRating(){return 5;} | |
add_filter( 'listify_ratings_default_rating', 'editDefaultRating', 10, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_listify_single_job_listing_actions_after() { | |
echo '<a href="#job_listing-author-apply" data-mfp-src=".job_application" class="popup-trigger button">' . __( 'Contact', 'listify' ) . '</a>'; | |
} | |
add_filter( 'listify_widget_job_listing_content_after', 'custom_listify_single_job_listing_actions_after' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add your own function to filter the fields | |
add_filter( 'submit_job_form_fields', 'remove_listify_submit_job_form_fields', 9999 ); | |
// This is your function which takes the fields, modifies them, and returns them | |
function remove_listify_submit_job_form_fields( $fields ) { | |
if( ! isset( $fields['job'] ) ) { | |
return $fields; | |
} | |
// If listing fields fields exist in Job array, remove them | |
if( isset( $fields['job']['featured_image'] ) ) { |