Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created August 11, 2020 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damiencarbery/ee276fb3f311a63c7891a99da0ec9db9 to your computer and use it in GitHub Desktop.
Save damiencarbery/ee276fb3f311a63c7891a99da0ec9db9 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: CTA over hero image on inner pages
Plugin URI: https://www.damiencarbery.com
Description: Add a CTA on the hero image on inner pages (i.e. not on home page).
Author: Damien Carbery
Version: 0.1
*/
//<a class="button primary" href="#newsletter">Join Us Today</a>
add_action( 'essence_entry_header', 'dcwd_cta_on_inner_pages', 11 );
function dcwd_cta_on_inner_pages() {
if ( is_front_page() ) {
return;
}
echo '<a class="button primary" href="#">CTA Text</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment