Created
May 11, 2016 20:14
-
-
Save ronalfy/61a96e2d22d4d7ce9690228ec42af277 to your computer and use it in GitHub Desktop.
Custom H1 for Advanced Custom Fields
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 | |
function fichte_custom_title( $post_id ) { | |
$title = get_field( 'custom_h1', $post_id ); | |
if ( false == $title || empty( $title ) ) { | |
echo esc_html( get_the_title( $post_id ) ); | |
} else { | |
echo esc_html( $title ); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment