• Resolved ndaustin

    (@ndaustin)


    I’m using the free css template’s “embouteillage” template on my band’s blog page, Buried Head.
    Within that template is a 160×600 advert panel that I wish to insert an affiliate linked banner advertisement.
    The html code link for the affiliate banner is:

    <img border=”0″ src=”https://www.addnewfriends.com/affiliate/banners/160×600.jpg&#8221; width=”160″ height=”600″>

    I see that in the header php there is a reference to the advert panel as follows:

    <!– start page –>
    <div id=”page”>

    <!– You can use the Text Widget to add content in –>
    <!– this column (e.g. HTML codes for your banner.) –>
    <div id=”adbar”>

      <?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Adbar’)): ?>

    • <img src=”<?php bloginfo(‘template_url’); ?>/images/ad160x600.gif” alt=”” width=”160″ height=”600″ />
    • <?php endif; ?>

    </div>

    Can someone tell me what I need to put where within this php code please? I have no knowledge of php.
    Though the reference to the advert panel is within the header.php, the panel appears to be on the right of the sidebar on the page.

    I have used the same template for the main Buried Head index page, though that uses html and css and I have therefore been able to insert a similar banner link successfully there using dreamweaver.
    But php has me totally confused.

    Thanks,
    Norman Austin

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ndaustin

    (@ndaustin)

    I’m using the free css template’s “embouteillage” template on my band’s blog page, Buried Head.
    Within that template is a 160×600 advert panel that I wish to insert an affiliate linked banner advertisement.
    The html code link for the affiliate banner is:

    <img border=”0″ src=”https://www.addnewfriends.com/affiliate/banners/160×600.jpg&#8221; width=”160″ height=”600″>

    I see that in the header php there is a reference to the advert panel as follows:

    <!– start page –>
    <div id=”page”>

    <!– You can use the Text Widget to add content in –>
    <!– this column (e.g. HTML codes for your banner.) –>
    <div id=”adbar”>

    * <?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Adbar’)): ?> <img src=”<?php bloginfo(‘template_url’); ?>/images/ad160x600.gif” alt=”” width=”160″ height=”600″ />

    <?php endif; ?>

    </div>

    Can someone tell me what I need to put where within this php code please? I have no knowledge of php.
    Though the reference to the advert panel is within the header.php, the panel appears to be on the right of the sidebar on the page.

    I have used the same template for the main Buried Head index page, though that uses html and css and I have therefore been able to insert a similar banner link successfully there using dreamweaver.
    But php has me totally confused.

    Thanks,
    Norman Austin

    locate the code you posted, in heaeder.php:

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Adbar')): ?> <img src="<?php bloginfo('template_url'); ?>/images/ad160x600.gif" alt="" width="160" height="600" />
    
    <?php endif; ?>

    replace everything within the <img src="..." /> with your affilate code:
    the code should look like this:

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Adbar')): ?> <a href="https://www.addnewfriends.com/8890-0-1-8.html"><img border="0" src="https://www.addnewfriends.com/affiliate/banners/160x600.jpg" width="160" height="600"></a>
    
    <?php endif; ?>

    and ignore the textwidget instruction.
    good luck ??

    ps: after a while working with the wordpress codes, it is getting quite easy to see past the php and focus on the html structure behind it.

    Thread Starter ndaustin

    (@ndaustin)

    Thank you so much.
    I’ve done exactly as you said and it works great.

    Is there something simple that I can add to make the link open in a new window?

    add target="_blank" to this bit of the code:
    <a href="https://www.addnewfriends.com/8890-0-1-8.html">
    so it looks like:
    <a href="https://www.addnewfriends.com/8890-0-1-8.html" target="_blank">

    Thread Starter ndaustin

    (@ndaustin)

    Of course… It’s making more sense now. Thank you.
    I’ll do some php study.

    In the meantime, if you have time, maybe you could have a look at my other query here regarding main menu links.

    …but if you are busy then don’t worry, your help has been much appreciated.

    Norman

    sweetscenesent

    (@sweetscenesent)

    Does anyone know how to change the banner ad image’s url under foliocase? I get changing the url for the actual web address? but what about the picture that you actually click on that goes to the website?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘how do I insert an affiliate advertisement?’ is closed to new replies.