WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding Image as H1 (8 posts)

  1. NWC
    Member
    Posted 1 year ago #

    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.]

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    What code have you tried?
    Would you like the image to replace the text?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Try posting on the parent theme's dedicated forum: http://themeid.com/forum/

  4. NWC
    Member
    Posted 1 year ago #

    Hi Andrew,

    Thanks so much for your reply. I have tried using the img src code(in several versions, i.e. <img src="" and $image, etc.) in the 2nd Echo line where it is giving the "Hello World" if nothing is entered for text.

    Yes I would like the image to replace the text, as I would like to use our company font/logo for this.

    Thanks again for your reply,

    Jeff

  5. NWC
    Member
    Posted 1 year ago #

    Thanks esmi, I apologize for posting in the wrong area of the forum.

  6. Emil Uzelac
    Theme Review Admin
    Posted 1 year ago #

    Please close this topic as resolved and we'll take care of this at http://themeid.com/forum

    Thanks,
    Emil

  7. NWC
    Member
    Posted 1 year ago #

    I have now listed this topic as Resolved and will re-post it at themeid.com/forum as requested.

    Thanks,

    Jeff

  8. Emil Uzelac
    Theme Review Admin
    Posted 1 year ago #

    Thanks, I already answered :)

    Emil

Topic Closed

This topic has been closed to new replies.

About this Topic