WordPress.org

Support

Support » How-To and Troubleshooting » Insert hyperlinked images to header

Insert hyperlinked images to header

  • G-Olly
    Participant

    @g-olly

    Hi there,

    I am pretty much a php novice and need to know to add hyperlink images to my wordpress site header. here is the site. I want to place 3 small flags under the RSS + Twitter area. These flags then need to link to the relevant sites.

    I have seen lots of threads about clickable and rotating header images but cannot find one relating to this anywhere. Can someone please advise as I’m losing the will to live?

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi
    Forum Moderator

    @esmi

    You probably need to add the links to your theme’s header.php template file.

    G-Olly
    Participant

    @g-olly

    indeed, but where and using what tags? HTML hyperlink image tags don’t seem to work.

    esmi
    Forum Moderator

    @esmi

    Just use the normal <a...></a> and <img.../> HTML tags.

    G-Olly
    Participant

    @g-olly

    for example do I call the images using php and make them clickable with it to. If so how do I go about this and how do position them? Or do I call a div with css styling and positioning? Or do I do something completely different? As I say I’m a php novice so any help would be very appreciated.

    G-Olly
    Participant

    @g-olly

    Thanks by the way, I will try it again.

    esmi
    Forum Moderator

    @esmi

    You can add the image(s) using any method that you want to that suits your needs. There are no hard & fast rules.

    G-Olly
    Participant

    @g-olly

    Hi Esmi,

    I wonder if you could help me as I have tried to just place the image files in using html tags but it doesn’t seem to work. I think I have isolated the area in which it needs to be placed. Could you advise me as to the right code to use and where?

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Many thanks,
    Olly

    G-Olly
    Participant

    @g-olly

    Here is the code again:

    http://pastebin.com/BkahDsvh

    G-Olly
    Participant

    @g-olly

    Ooops that didn’t work. I have tried all the ways I can and I still seem to be unable to even get a div to show.

    <div id="header">
    <div id="flag_area"></div>
       <?php if ($options['use_logo']) : ?>
       <div id="logo_image">
        <h1><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_url'); ?>/img/<?php echo $options['logo_name']; ?>" title="<?php bloginfo('name'); ?>" alt="<?php bloginfo('name'); ?>" /></a></h1>
       </div>
       <?php else : ?>
       <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
        <h1><?php bloginfo('description'); ?></h1>
       </div>
       <?php endif; ?></div>

    with <div id=”flag_area”></div> being the div which I have given a backround of a flag. Can someone please help?

    Olly

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Insert hyperlinked images to header’ is closed to new replies.