Skip to content

Instantly share code, notes, and snippets.

@leowebguy
Created December 14, 2015 13:46
Show Gist options
  • Save leowebguy/8fa89368d68ed61935d7 to your computer and use it in GitHub Desktop.
Save leowebguy/8fa89368d68ed61935d7 to your computer and use it in GitHub Desktop.
Add content to WordPress using wp_head if is Front Page
function add_scroll() {
if ( is_page( 'Home' ) ) {
echo '<div class="slide_anchor_holder active"><a class="slide_anchor_button anchor current" href="#scroll-down">See What Makes Us Different</a></div>';
echo '<div class="slide_anchor_line"><span class="slide_anchor_line1"></span></div>';
echo '<div class="latest_news"><a class="slide_anchor_button anchor current" href="#scroll-news">View Our Latest News</a></div>';
}
}
add_action('wp_head', 'add_scroll' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment