Support » Themes and Templates » Adding Image as H1

  • Resolved NWC

    (@nwc)


    Hi,

    I am trying to use an image for the H1 Headline rather than text that is inputted under Dashboard->Appearance->Theme Options->Home Page.

    I have a child theme going for the Responsive theme that I am customizing and am thinking that editing the code in home.php will be the place to do this. Here is the code I am looking to edit

    <?php $options = get_option('responsive_theme_options');
    			// First let's check if headline was set
    			    if ($options['home_headline']) {
                        echo '<h1 class="featured-title">';
    				    echo $options['home_headline'];
    				    echo '</h1>';
    			// If not display dummy headline for preview purposes
    			      } else {
    			        echo '<h1 class="featured-title">';
    				    echo __('Hello, World!','responsive');
    				    echo '</h1>';
    				  }
    			?>

    In the “If not display the dummy headline for preview purposes” section, I am unsuccessfully trying to insert an img src that we’ll call logo.jpg that is in themes/responsive-child/images/logo.jpg

    I have searched but not been able to find the correct code to do this. I would appreciate it if someone could point me in the right direction.

    Thanks in advance,

    Jeff

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding Image as H1’ is closed to new replies.