Created
September 9, 2020 23:05
-
-
Save tripflex/f68eea367a93ff14220db1e55f2cce40 to your computer and use it in GitHub Desktop.
Output og:image tag for Resume featured image when using WP Job Manager Field Editor
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 | |
add_action( 'wp_head', 'smyles_output_resume_og_image' ); | |
function smyles_output_resume_og_image() { | |
if( is_singular('resume') ) { | |
echo '<meta property="og:image" content="' . get_the_post_thumbnail_url( get_the_ID(), 'full' ) . '" />'; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jobs:
https://gist.github.com/tripflex/595c32a0ebdfc7b0106984afc8712afe