Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Full Width Hero Background with ParticleJS Pattern on Front Page
//* Full Width Hero Background with ParticleJS Pattern on Front Page
//* Add Excerpt support to Pages in Genesis (Optional)
add_post_type_support( 'page', 'excerpt' );
//* Display Page Title and Page Excerpt (as Subtitle) after Header
add_action( 'genesis_header', 'blog_archive_remove_page_title');
function blog_archive_remove_page_title () {
if (is_front_page()) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_after_header', 'blog_archive_after_header_content' );
function blog_archive_after_header_content() {
?>
<div class="post-hero" style="background-color:#da2020">
<div id="particlesbg" class="wrap">
<?php echo '<h1 itemprop="headline" class="blog-title">' . genesis_do_post_title() . '</h1>'; ?>
<?php echo '<p class="page-excerpt">' . get_the_excerpt() . '</p>'; ?>
</div>
</div>
<?php
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment