WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] blog title image insertion (6 posts)

  1. Jane Doe
    Member
    Posted 4 years ago #

    Before posting here, I searched on this forum and Google but could not find an answer to my question so please bear with me as I learn this stuff. I would rather use an image as my blog's title, instead of the default font. How do I insert it? The header code is below. Thank you for any help.

    <title><?php bloginfo('name'); ?><?php if (is_home()) {if (get_bloginfo('description')!='') {echo '. ';} bloginfo('description');} ?> <?php if ( is_single() )?> <?php wp_title(); ?></title>

  2. stvwlf
    Member
    Posted 4 years ago #

    The code you pasted in is not the correct code. What you pasted creates the title for the HTML page, what appears in the upper left hand corner of the browser window, above the browser menus, and is used by search engines to index your pages.

    The title you are looking for is after the <body> tag, farther down in the theme's header.php file.

    Your best bet is to paste that code here for assistance. It will typically start with something like
    <div id="header"> or <div id="hdr_image"> and will typically contain an <h1> tag

    If you can also post the URL to your site, that is very helpful.

  3. Jane Doe
    Member
    Posted 4 years ago #

    Thanks so much for responding. I am so sorry for posting the wrong code. Here is the correct one. I hope. I can't currently post a link to my site because it is right in the middle of being transferred to a new host. I should be able to post the link tomorrow, if it goes without a hitch.

    div id="header">
    
          <!-- Blog Description -->
          <div id="blackband_top_left">
            <h2><?php bloginfo('description'); ?></h2><?php include_once (TEMPLATEPATH."/_counters_header.php"); ?>
          </div>
  4. rizaldy
    Member
    Posted 4 years ago #

    if just inserting image instead using default font then the easy solution is just delete <h2><?php bloginfo('description'); ?></h2> and change it with <img src="path/to/image">

    cheers
    A-r

  5. stvwlf
    Member
    Posted 4 years ago #

    Hi

    What rizaldy suggested is the simplest way to do it. In some themes doing it that way can reposition other header elements where you don't want them if the image is a different size than the text it's replacing. Try it that way first because if it works it's simple.

    If you don't know the code, assuming the image is in the theme's images folder, it is
    <h2><img src="<?php bloginfo('template_directory'); ?>/images/filename.jpg" alt="Name of my site" /></h2>

    If doing it that way messes up your layout and you need more help, post back with the URL after it goes online.

  6. Jane Doe
    Member
    Posted 4 years ago #

    Thank you both very much!

Topic Closed

This topic has been closed to new replies.

About this Topic