Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created October 16, 2020 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/5151ba7a0754da099bb1b52c64f3bb73 to your computer and use it in GitHub Desktop.
Save tripflex/5151ba7a0754da099bb1b52c64f3bb73 to your computer and use it in GitHub Desktop.
[job_apply] shortcode from get parameter when using WP Job Manager Field Editor
<?php
add_shortcode( 'job_apply_from_get', 'smyles_job_apply_from_get' );
function smyles_job_apply_from_get( $atts, $content = '' ) {
if( ! isset( $_GET['job_id'] ) ){
return '';
}
$job_id = absint( $_GET['job_id'] );
return do_shortcode( "[job_apply id='{$job_id}']");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment