The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Sidebar (Headers) replacing with graphics (6 posts)

  1. doctorbean
    Posted 11 years ago #

    I asked this question recently.In the sidebar I want to replace the header text with graphics.I was told this is done altering the sidebar.php.

    <div id="sidebar">

    • <h2><?php _e('Subcribe'); ?></h2>
    • Do I just replace ?php _e('Subcribe'); ? with the image URL ?

      as in this example.

    • <h2><http://alexandersvideos.com/images/sidebarsubsribe.gif></h2>

      Appreciate any response,



  2. Kafkaesqui

    Posted 11 years ago #

    That should work; you'll probably want to remove the h2 tags, as well, though if any css positioning or whatnot is occuring to them you'll need to modify this in your style.css to affect the img element instead.

  3. tauquil
    Posted 11 years ago #

    This is the code I've used to add images to my sidebar:

    <h2><?php _e('<img src="/wp-content/images/title_about.gif" border="0" alt="about" />'); ?></h2>

    Although I'm sure, like Kafkaesqui said, just adding the image link will work fine...and is a lot cleaner!

  4. doctorbean
    Posted 11 years ago #

    Thanks people I will attempt this action.

  5. syrupcore
    Posted 11 years ago #

    you could also declare it in the css.

    #sidebar h2 {background-image: url(fullpath);

    might not be practical if you have different h2s in the sidebar. The could be classed but... The benefit is that you could put text in there that screen readers and cell phones could use.

    google 'image replacement technique' for more.

  6. doctorbean
    Posted 11 years ago #

    OK ive added the graphic but its just sat on the default header box.How do I remove that,and all so how do I reallign the graphic.

    Please help


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.