• Resolved danatstadiumvolleyball

    (@danatstadiumvolleyball)


    How do we make the ads open in a new tab?

    the html would be :
    <a href="https://www.host.com/image.gif" target="_blank"><img src="" alt="ad-image" name="image" width="125" height="125" id="image" />

    But entering anything other than the image address causes an error, not the open in new tab behavior that we want.

Viewing 6 replies - 1 through 6 (of 6 total)
  • iridiax

    (@iridiax)

    There’s several things wrong here:

    • The link (href) is to the image instead of to a page
    • The image URL is missing (img src=””)
    • The closing a tag is missing
    Thread Starter danatstadiumvolleyball

    (@danatstadiumvolleyball)

    oh – i didn’t explain enough, sorry, the form – entry field seems to only accept an entry as a simple url and messes up anything else (quotes, brackets, etc…)

    iridiax

    (@iridiax)

    entry field seems to only accept an entry as a simple url and messes up anything else (quotes, brackets, etc…)

    Then you can only enter an URL here, not code. Either try a different plugin or enter your ad code yourself. WP125 does click tracking, and opening an ad page in a new window may interfere with that.

    As of yet, the plugin won’t open the ads with a _blank target. I may include an easy option to do so in a later version, due to popular demand, but for now the easiest way to do it would be to open up wp125.php in a text editor and find the <a> lines in it and add target="_blank" attributes to them.

    There are some lines that look something like this:

    echo '<div class="wp125ad"></a><a href="'.$linkurl.'" rel="nofollow"><img src="'.$adguidearray[$curslot]
    ['image_url'].'" alt="'.$adguidearray[$curslot]['name'].'" /></a></div>';

    Just find them and put your target=”_blank” attributes in them, right after the spots that say rel="nofollow".

    Regards,
    Matt

    Just an update, version 1.2 includes an easier way to enable _blank targetting. Just open wp125.php and uncomment the first “define(…” line. ??

    Thread Starter danatstadiumvolleyball

    (@danatstadiumvolleyball)

    THANKS for adding that in the 1.2 !!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP125 Howto make ads target=”_blank”’ is closed to new replies.