Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorwebfadds
    • CommentTimeMay 16th 2008 edited
     

    Hi -

    I am working on an installation where we would like to set up a zone to place a wide banner at top of all pages and posts. I have tried inserting the PHP code generated in the proper position in the WordPress template, but the banner does not show up there... though it works fine in either the header or footer. Here's a screenshot showing the "inline" option working (but inline does not rotate on pages, so trying to solve it in the php templates):

    Code used in templates (with no result) is:
    if(function_exists('oiopub_banner_output')) oiopub_banner_output('', 2);

    Two questions:

    • Is it possible to place that code in a page and index template for WordPress and have the banner work, and if so -- what am I doing wrong?
    • I assume that placing code calling in the same "zone" in two different templates will work fine to rotate the banners in that same zone throughout those two different locations?

    Thanks -
    Scott

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeMay 16th 2008
     
    Project Admin

    The output code should work in any position in any Wordpress template page, as long as it is below the </head> line (since the database query is run at the wp_head() hook).

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorwebfadds
    • CommentTimeMay 16th 2008 edited
     

    Hi -

    FYI, I could not get the output code presented above to work, but got the "Ad Server" javascript code to work at:
    http://www.swfloridabusinesstoday.com/

    However, I noticed that the ads don't seem to rotate this way. Suggestions?

    - Scott

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeMay 17th 2008
     
    Project Admin

    You could try using alternative cache headers at the top of js.php

    header("cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    header("Expires: Mon, 27 Aug 2007 00:00 GMT");

    Alternatively, you could add a random number to the end of the js file using php, by adding it to the end of the url:

    &<?php echo rand(); ?>

    Need help?  Quick start guide | Troubleshooting | All help topics