Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created January 4, 2024 22:21
Show Gist options
  • Save tripflex/2ffa41517fee59779150a138f2933135 to your computer and use it in GitHub Desktop.
Save tripflex/2ffa41517fee59779150a138f2933135 to your computer and use it in GitHub Desktop.
Only output Remote label without Google Map Link when remote position and using WP Job Manager Field Editor
<?php
add_filter( 'the_job_location_map_link', 'smyles_disable_output_remote_location_link', 9999, 3 );
function smyles_disable_output_remote_locations( $link, $location, $post ){
if( $post->_remote_position ){
return apply_filters( 'the_job_location_anywhere_text', __( 'Remote', 'wp-job-manager' ) );
}
return $link;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment