Skip to content

Instantly share code, notes, and snippets.

@yanknudtskov
Forked from billerickson/functions.php
Last active February 7, 2019 12:44
Show Gist options
  • Save yanknudtskov/c2a902f5c2f4083099d39045e67d23bc to your computer and use it in GitHub Desktop.
Save yanknudtskov/c2a902f5c2f4083099d39045e67d23bc to your computer and use it in GitHub Desktop.
Removing advanced custom fields from the frontend
<?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