• Hi to avryone, I need to insert affiliat code associate with images/Gatto.gif in the (sidebar.php) but Im in trouble. I hope someone more experienced than me can help me
    many thanks
    Paolo

    global $options; // This code retrieves all our greenxi options. ?>
    <?php foreach ($options as $value) {
    if (get_option( $value[‘id’] ) === FALSE) { $$value[‘id’] = $value[‘std’]; } else { $$value[‘id’] = get_option( $value[‘id’] ); } } ?>
    <div id=”sidebar”>
    <!– sidebard div –>
    <!– Begin Banner 125×125 –>
    <?php if ($grix_option_banner125x125 == “1”) {
    } elseif ($grix_option_banner125x125 == “2”) { ?>
    <div class=”backgroundlist”>
    <div class=”listtitle”>
    <h2><?php echo $grix_option_title_banner; ?></h2>
    </div>
    <div class=”contentbanner”>
    <div class=”banner125″>
    <?php if ( $grix_option_b125tl == “” ) { ?>
    <img src=”<?php bloginfo(‘template_directory’); ?>/images/Gatto.gif” width=”125″ height=”125″ alt=”banner” />

Viewing 3 replies - 1 through 3 (of 3 total)
  • so are you trying to make that image a link to an affiliate so when they click on them it takes you to the affiliate site?

    If so you’d just need to add a link to your img.

    <a href="http://youraffiliatecodelinkhere.com"><img src="<?php bloginfo('template_directory'); ?>/images/Gatto.gif" width="125" height="125" alt="banner" /></a>

    Your last line of code should look something like the above if you just need to add a link to your image that links to your affiliate site.

    Does this help?

    Thread Starter paolovi

    (@paolovi)

    Yes Tymayn, it works great! Thanks for your good suggestion.

    Glad to help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add a banner to the sidebar’ is closed to new replies.