Last active
August 29, 2015 14:19
-
-
Save tripflex/b247f29301907c0f18d1 to your computer and use it in GitHub Desktop.
Add custom field button next on header image of Listify theme
This file contains hidden or 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 | |
| function custom_listify_single_job_listing_actions_after() { | |
| global $post; | |
| $url = get_post_meta( $post->ID, '_company_website', true ); | |
| $offerta_url = get_post_meta( $post->ID, '_company_offerta', true ); | |
| if( $offerta_url ) echo "<a href=\"" . esc_url( $url ) . "\" class=\"button\" target=\"_blank\">VAI ALL 'OFFERTA</a>"; | |
| echo '<a href="' . esc_url( $url ) . '" class="button" target="_blank">Vai al sito</a>'; | |
| } | |
| add_filter( 'listify_single_job_listing_actions_after', 'custom_listify_single_job_listing_actions_after' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment