WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The site i'm refering to is Safety Warehouse. It is currently running on a Genesis theme, with the front-page.php displaying a grid loop of the custom post type. I want to add an H1 (or at least a header tag) to use before the content. How can I do this?

My Front-page.php

 * The custom portfolio post type archive template

/** Force full width content layout */
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

/** Remove the breadcrumb navigation */
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );

/** Remove the post info function */
remove_action( 'genesis_before_post_title', 'genesis_post_info' );

/** Remove the post content */
remove_action( 'genesis_post_content', 'genesis_do_post_content' );

/** Remove the post image */
remove_action( 'genesis_post_content', 'genesis_do_post_image' );

/** Add the featured image after post title */
add_action( 'genesis_post_title', 'executive_portfolio_grid' );
function executive_portfolio_grid() {
    if ( has_post_thumbnail() ){
        echo '<div class="portfolio-featured-image">';
        echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
        echo get_the_post_thumbnail($thumbnail->ID, 'portfolio' );
        echo '</a>';
        echo '</div>';

/** Remove the post meta function */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

share|improve this question
I don't understand why someone would downvote this. I'm asking how to hook something into the home page of my website. I'm a little confused because of the homepage being controlled by front-page.php instead of the usual is_home conditionals I work with. – Zach Russell May 19 '13 at 4:14
Without the code of your front-page.php this is impossible to answer. – toscho May 19 '13 at 7:31
I added front-page.php – Zach Russell May 19 '13 at 20:42

This template has removed the content.

/** Remove the post content */
remove_action( 'genesis_post_content', 'genesis_do_post_content' );

So, I assume you want this new tag before this:

<div class="entry-content">

I would suggest not using an h1 tag. It violates the SEO on the page. The page title is in an h1 tag.

<div id="title-area"><h1 id="title"><a href="http://safetyhouse.wpengine.com/" title="Safety Warehouse">Safety Warehouse</a></h1></div><!-- end #title-area -->

The post title is an h2 tag.

<h2 class="entry-title"><a href="http://safetyhouse.wpengine.com/portfolio/traffic-cone-store/" title="Traffic Cone Store" rel="bookmark">Traffic Cone Store</a></h2>

Using an h1 tag at this point may confuse search engines.

To add content to the page above each post content use the 'genesis_before_post_content' action:

add_action( 'genesis_before_post_content', 'wpse_99943_before_content_tag' );
function wpse_99943_before_content_tag() {
    echo '<h3>You didn\'t say what you wanted here.</h3>';
share|improve this answer

With Genesis >= 2.0 you would do it this way:

function wpse_99943_before_content_tag() {
    echo '<h3>You didn\'t say what you wanted here.</h3>';
add_action( 'genesis_entry_header', 'wpse_99943_before_content_tag' );

See http://www.carriedils.com/genesis-2-0-hooks/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.