WordPress.org

Ready to get started?Download WordPress

Forums

Insert hyperlinked images to header (10 posts)

  1. G-Olly
    Member
    Posted 2 years ago #

    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

  2. esmi
    Forum Moderator
    Posted 2 years ago #

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

  3. G-Olly
    Member
    Posted 2 years ago #

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

  4. esmi
    Forum Moderator
    Posted 2 years ago #

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

  5. G-Olly
    Member
    Posted 2 years ago #

    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.

  6. G-Olly
    Member
    Posted 2 years ago #

    Thanks by the way, I will try it again.

  7. esmi
    Forum Moderator
    Posted 2 years ago #

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

  8. G-Olly
    Member
    Posted 2 years ago #

    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

  9. G-Olly
    Member
    Posted 2 years ago #

    Here is the code again:

    http://pastebin.com/BkahDsvh

  10. G-Olly
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic