-
-
Save mikejolley/99fef2c01d29cfa3837c to your computer and use it in GitHub Desktop.
A custom job-application.php file
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
<?php if ( $apply = get_the_job_application_method() ) : | |
if ( $apply->type === 'url' ) { | |
$application_href = $apply->url; | |
} elseif ( $apply->type === 'email' ) { | |
$application_href = sprintf( 'mailto:%1$s%2$s', $apply->email, '?subject=' . rawurlencode( $apply->subject ) ); | |
} | |
?> | |
<div class="application"> | |
<a class="application_button button" href="<?php echo $application_href; ?>"><?php _e( 'Apply for job', 'wp-job-manager' ); ?></a> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What would it be a button, I replaced part of the code.
Instead of this:
I wrote this: