-
-
Save yanknudtskov/c2a902f5c2f4083099d39045e67d23bc to your computer and use it in GitHub Desktop.
Removing advanced custom fields from the frontend
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 be_call_to_action() { | |
$title = esc_html( get_option( 'options_be_cta_title' ) ); | |
$button_text = esc_html( get_option( 'options_be_cta_button_text' ) ); | |
$button_url = esc_url( get_option( 'options_be_cta_button_url' ) ); | |
if( $title && $button_text && $button_url ) | |
echo '<div class="call-to-action"><div class="wrap"><p>' . $title . '</p><p><a href="' . $button_url . '" class="button">' . $button_text . '</a></p></div></div>'; | |
} | |
add_action( 'genesis_before_footer', 'be_call_to_action' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment