{"id":1085347,"date":"2016-03-04T12:58:20","date_gmt":"2016-03-04T20:58:20","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/"},"modified":"2016-03-07T16:12:33","modified_gmt":"2016-03-08T00:12:33","slug":"add-full-width-header-image-before-template-output-w-genesis-framework-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/","title":{"rendered":"Add full width header image before template output w\/ Genesis Framework"},"content":{"rendered":"<p>My website is on the Genesis Framework and I\u2019ve added the follow to my functions.php to output a full width after_header image on single pages.<\/p>\n<p><code>add_action ( 'genesis_after_header', 'bl_featured_image', 9 );<br \/>\n\/\/* Display Featured image after header<br \/>\nfunction bl_featured_image() {<\/p>\n<p>    if ( has_post_thumbnail() &amp;&amp; ( is_page() || is_single() ) &amp;&amp; 0 === get_query_var( 'page' ) ) {<\/p>\n<p>        \/\/ Get the URL of featured image<br \/>\n        $image = genesis_get_image( 'format=url' );<\/p>\n<p>        \/\/ Get the alt text of featured image<br \/>\n        $thumb_id = get_post_thumbnail_id( get_the_ID() );<br \/>\n        $alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );<\/p>\n<p>        \/\/ If no alt text is present for featured image, set it to Post\/Page title<br \/>\n        if ( '' == $alt ) {<br \/>\n            $alt = the_title_attribute( 'echo=0' );<br \/>\n        }<\/p>\n<p>        \/\/ Display featured image<br \/>\n        printf(<br \/>\n            '&lt;div class=\"my-featured-image\"&gt;<img decoding=\"async\" src=\"%s\" alt=\"%s\" \/>&lt;\/div&gt;',<br \/>\n            esc_url( $image ),<br \/>\n            $alt<br \/>\n        );<\/p>\n<p>    }<\/p>\n<p>}<\/code><\/p>\n<p>I have tried adding the following into the default-theme.php in my child theme directory; and still no luck.<\/p>\n<p><code>add_action ( 'genesis_after_header', 'bl_featured_image', 9 );<br \/>\nfunction add_month_view_header_img( printf ) {<br \/>\n    if ( ! tribe_is_month() ) return printf;<br \/>\n    \/\/ Display featured image<br \/>\n    printf(<br \/>\n        '&lt;div class=\"my-featured-image\"&gt;&lt;img src=&quot;<a href=\"http:\/\/block.wpengine.com\/wp-content\/uploads\/events-text.jpg&amp;quot\" rel=\"nofollow\">http:\/\/block.wpengine.com\/wp-content\/uploads\/events-text.jpg&amp;quot<\/a>; alt=\"Events Banner\" \/&gt;&lt;\/div&gt;',<br \/>\n        esc_url( $image ),<br \/>\n        $alt<br \/>\n    );<\/p>\n<p>}<\/code><\/p>\n<p>Can anyone assist me with adding the full width header image hooked into the \u2018genesis_after_header\u2019 location?<\/p>\n","protected":false},"template":"","class_list":["post-1085347","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add full width header image before template output w\/ Genesis Framework -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add full width header image before template output w\/ Genesis Framework -\" \/>\n<meta property=\"og:description\" content=\"My website is on the Genesis Framework and I\u2019ve added the follow to my functions.php to output a full width after_header image on single pages. add_action ( &#039;genesis_after_header&#039;, &#039;bl_featured_image&#039;, 9 ); \/\/* Display Featured image after header function bl_featured_image() { if ( has_post_thumbnail() &amp;&amp; ( is_page() || is_single() ) &amp;&amp; 0 === get_query_var( &#039;page&#039; ) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-03-08T00:12:33+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/\",\"name\":\"Add full width header image before template output w\/ Genesis Framework -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-03-04T20:58:20+00:00\",\"dateModified\":\"2016-03-08T00:12:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Add full width header image before template output w\/ Genesis Framework\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add full width header image before template output w\/ Genesis Framework -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/","og_locale":"en_US","og_type":"article","og_title":"Add full width header image before template output w\/ Genesis Framework -","og_description":"My website is on the Genesis Framework and I\u2019ve added the follow to my functions.php to output a full width after_header image on single pages. add_action ( 'genesis_after_header', 'bl_featured_image', 9 ); \/\/* Display Featured image after header function bl_featured_image() { if ( has_post_thumbnail() &amp;&amp; ( is_page() || is_single() ) &amp;&amp; 0 === get_query_var( 'page' ) [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/","article_modified_time":"2016-03-08T00:12:33+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/","name":"Add full width header image before template output w\/ Genesis Framework -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-03-04T20:58:20+00:00","dateModified":"2016-03-08T00:12:33+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-full-width-header-image-before-template-output-w-genesis-framework-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Add full width header image before template output w\/ Genesis Framework"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085347\/revisions"}],"predecessor-version":[{"id":1086054,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085347\/revisions\/1086054"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1085347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}