WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar (Headers) replacing with graphics (6 posts)

  1. doctorbean
    Member
    Posted 8 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,

      thanks,

      Alexander

  2. Kafkaesqui

    Posted 8 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
    Member
    Posted 8 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
    Member
    Posted 8 years ago #

    Thanks people I will attempt this action.

  5. syrupcore
    Member
    Posted 8 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
    Member
    Posted 8 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

    Alexander

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.