Well I got it working with a different approach but a good answer that provides insight why the approach in my question didn’t work will be accepted as the answer.
I put this in functions.php for the child theme:
add_action( 'genesis_before_header', 'bob_gray_image', 10 );
function bob_gray_image() {
if ( is_front_page() ) {
echo('<div class="bobgrayimage"><img src="https://wordpress.stackexchange.com/images/robert-c-gray-banner-maskbob-sharpen.jpg"></div>');
}
}
Related Posts:
- Genesis – Customize search form
- How to target with css, admin elements according to user role level?
- WordPress Shortcode and Dynamic CSS
- Need help on WordPress and php
- Multiple pages on one with different HTML
- WordPress loop specific thumbnail size
- wp_enqueue_style with style.php and WordPress functions
- Minify HTML, CSS, JS with PHPWee?
- WordPress override bloginfo variable
- Shortcode content output but not in correct place
- An unwanted inline style is added to my body tag
- Displaying theme options in css
- Show post in slider
- Add a custom stylesheet for BlackBerry
- How can I hide Home in my menu in a specific page?
- Get different images for mobile and desktop with php, advanced custom fields without using js and ajax
- How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts
- Selectbox in admin panel function linking to CSS
- Using if/else statements with output from theme options
- Is there CSS to expand the gallery limit on Index Pages?
- How to display pictures from database?
- Different post styles depending on category
- two columns of posts on homepage, one of them “favorites”
- custom css for admin only
- responsive.css in the WordPress should be prioritized
- WordPress style.css not updating, only after theme reload
- Adding logo to WordPress header
- Thumbnails appear to be zoomed
- Odd / Even posts add class minus first post
- WordPress archive page showing 404 Error [duplicate]
- Styling the second sidebar
- How to add drag and drop functionalities to a div inside option panel
- Removing WordPress Footer -without access to PHP code?
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- Use custom template on custom post type
- CSS change in woo commerce Place Order Text [closed]
- Post repeated when opening in overlay, how do I solve this? [closed]
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- Add New Text Box To WordPress Twenty Seventeen Header
- Split site title and apply different classes
- How to modify mobile nav menu text in theme
- Need help removing […] after excerpt
- Dividing the loop to style post differently
- jQuery accordion menu
- Twentyfifteen style author comment
- Extend Menu Walker Output
- Genesis / custom template page / setting the page title and meta desc
- Randomize Color Scheme Selection in Theme
- Dynamic CSS through PHP issue
- How to make changes to style.php [closed]
- conditional: if is page, and all subpages
- How to sort posts by active category in WordPress?
- Create Columns with Custom Walker and CSS Classes
- Background image no longer fits to screen now that project is in php files
- Why would the child theme load in the Customize preview, but not on the site itself?
- How to make only the valid active page of a multilevel menu active with – “.nav li.current-menu-item a”?
- echo cutom css code to WordPress page template file ? is this safe?
- WordPress custom php script to match standard page layout
- I can’t go to the page archive-{post_type}.php
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- I have a background-image in css file but don’t show in site.how to fix this prblm. i sent screenshot. thx
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- Trying to generate a CSS file in wordpress uploads folder
- WP Website is shown in HTML
- I cannot find the wordpress.scss file that my live site is pulling from
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- I have a lot of JavaScript erorrs after SSL someone can help me?
- I got big white screen when i attach main style sheet of Html in functions.php
- register dependency css and js inside a plugin class
- Hide author from search results meta, still display date and categories
- How to locate parent theme functions and add functions to my wordpress child theme?
- Make a full-width wordpress page
- Bring Font Awesome icons inside menu A tags
- Trying to add get_the_title hook to this line
- custom field – changing an element or background of id div – different versions not working
- user update profile for custom code
- Display specific main Sub Nav on Woocommerce product pages
- Relative post date in recent posts list
- Widget edit and add in any page
- Styling admin page rows in order of importance (checkboxes)
- How to save the output of php variables used in inline css code to the main style.css?
- Show contact 7 form in popup
- featured post as div background
- Combining fancybox with multiple thumbnail plugin
- Show Nav Link To Users Signed In
- Adding else if conditional statement to purchased theme
- Converting Menu Links to List Elements
- PHP Puzzle: Unique Styles with PHP loop
- How to use plugins_url() inside PHP stylesheet file [duplicate]
- How to get shared CSS body class between translated WPML pages [closed]
- Integrating CSS Into a WP Function Call [closed]
- How to customize posts in WordPress by using HTML and CSS?
- WP_Query not returning results
- Header location [closed]
- Blog listing not showing dates for every post and arrow missing off image
- How do I link the side images?
- How to create a container in php then customise it in CSS
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- inner-wrap div pushing custom table far down on page