Skip to content

Instantly share code, notes, and snippets.

@StewartChamberlain
Created June 23, 2013 16:24
Show Gist options
  • Select an option

  • Save StewartChamberlain/5845578 to your computer and use it in GitHub Desktop.

Select an option

Save StewartChamberlain/5845578 to your computer and use it in GitHub Desktop.
Purchase Overlay with conditionals
function sc_bottom_overlay() {
if ( in_category ( 'genesis themes' ) ) { // Only display if in category
$button_text = 'Purchase'; // Button Text
$link_uri = 'http://YOUR_LINK_HERE'; // Url for button Link
$overlay = '<div class="overlay"><span style="opacity:1;"><a class="overlay-button" href="'. $link_uri .'">'. $button_text .'</a></span></div>';
echo $overlay;
}
}
add_action( 'genesis_after_footer', 'sc_bottom_overlay' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment