Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author chriswgerber

    (@chriswgerber)

    Tags are enqueued a script in the head, and then rendered via shortcode ([dfp_ads id=#post_id]) or via a function (dfp_ad_position( $id )). A DFP_Ad_Position object can also be returned via another function and then rendered via a public method.

    $position = dfp_get_ad_position_by_name( $title );
    $position->display_position();

    Right now, it defaults to asynchronous rendering, but I can create a setting to switch to synch tags.

    Thread Starter Crssp

    (@crssp)

    So you are saying then that the plugin handles generating the ad code?

    All we will have to do, is just place the plugin generated shortcodes?

    Some of our sites have required us to go with synchronous tags.
    It wouldn’t be necessary, if I knew why they were not appearing using asynch tags on those sites.
    Just speaking hypothetically at the moment, getting ready to test on a new dev site, hopefully asynch works on this one.

    Thread Starter Crssp

    (@crssp)

    Hey Chris, just attempted to import DFP Ad Positions.
    I selected one ad position only.

    Checking and no ad position was created, I saw no sign of errors or anything.
    Any ideas, what may have went wrong?

    Thread Starter Crssp

    (@crssp)

    I went ahead and manually created the one ad position, and that seems to have went fine, will let you know when I get ads appearing, and finish more of the implementation then ??

    Thread Starter Crssp

    (@crssp)

    Hey success… success!
    Quick question is there an easy way to center align ads?
    Possibly in the plugin templates or something?
    Otherwise, I’m going to have to wrap the shortcode in a div tag or something.
    I tried just centering the shortcode using the visual editor tools as if it were a paragraph, that did not work.
    Possibly you’ve worked through the same issue then, and have ideas?
    thanks for a wonderful plugin.

    Thread Starter Crssp

    (@crssp)

    hi Chris, hey sorry for piling on in this one thread…
    If your plugin could add a universal class to the tags, rather than all unique to the Ad Position, that one class, could be told to center align, or whatever.

    Current structure created on my site was:

    <div id='ad_pos_sbo-ros-leaderboard' class="ad_pos_sbo-ros-leaderboard SBO-ros-leaderboard">

    Open to suggestions then, it’s sort of a problem with Google DFP ads, and a common complaint in other forums, how to center align a leader board etc.

    Plugin Author chriswgerber

    (@chriswgerber)

    Lots of questions.

    1. Yes. Just place the shortcode and the position will be created there.
    2. Did you get a confirmation that the position was created when importing?
    3. You would need to apply a style to the position (via id or class) to target it with styling currently. However, I’ll add a universal class to all ad positions with the next update.

    Thread Starter Crssp

    (@crssp)

    On 2. I don’t think I did get a confirmation, just a button came up that said return to importer.

    Having real troubles positioning the ads, not sure it’s anything to do with the plugin.
    I’ve tried every trick I can think of and the ad seems to be position at the left side of the window.
    Even If I place a div in the same row, that should appear left of the ad column, the new div is even forced beneath the ad. If anything it should appear above the ad.

    Does your plugin have any styles associated with ads?
    Planning to check in the plugin editor, and see if it’s soemthing there conflicting with this theme.
    Here’s a short url for an ad page: https://goo.gl/Q9cg6f

    For this ad in Google DFP I created the ad to used 468×60, 728×90, 970×90.
    Normallyl I just place one exact size, like 728×90, not sure of google dfp will handle placing those in a responsive manner, given a certain space available, or if their JS is that smart about placing ads.

    Thread Starter Crssp

    (@crssp)

    Could it be, the ad wrapped in a div, and none of those styles would apply to your shortcode.
    Creating .css per ad, will not be that hard, trying that now specific to the id=”ad_pos_sbo-ros-leaderboard”
    Probably solve all my troubles… guessing ??

    Thread Starter Crssp

    (@crssp)

    Boom that did it styling the plugin created ID worked.
    I added all of this for my styles this time around:

    /*-- Styling Google DFP ad positions --*/
    #ad_pos_sbo-ros-leaderboard {
     width: 960px;
     max-width: 100%;
     margin: 0 auto;
     text-align: center;
    }
    Thread Starter Crssp

    (@crssp)

    On the site homepage, the leaderboard ad should render beneath the slider on but instead is appearing at the top of the site above/behind the menu.
    Wierdness…
    Not sure what the answer will be for this.

    saw another issue, when I had a medium box ad 300×250 in a sidebar, the ad appeared above the h3 title for the widget in the sidebar in a blackstudio widget in a sidebar, removing the title solved that, but another strange bug for this theme or whatever.

    Thread Starter Crssp

    (@crssp)

    Just remembered your fine plugin includes a widget, so I should be working with that instead, may solve lots of issues for me then ??

    Plugin Author chriswgerber

    (@chriswgerber)

    I’ll be releasing a new version of the plugin later this week that has the option to disable asynchronous loading, fixes the shortcode issue, and adds a single extra class all of the ad positions.

    The master branch of the plugin repo on Github has these updates. https://github.com/ThatGerber/dfp-ads

    Thread Starter Crssp

    (@crssp)

    Awesome, ease of display, and displaying correctly according to a sites styles, will keep your plugin at the forefront of being both simple to use and awesome.

    Plugin Author chriswgerber

    (@chriswgerber)

    Thanks for the kinda words! Marking it as resolved.

    In keeping with WordPress’s motto of “Decisions not Options”, the plugin makes a lot of decisions for you. But there are a lot of hooks and filters that can be used to customize the results.

    Right now I’m working on putting together a full documentation and opening up APIs for developers to work from. So there’ll be more in the future, but hopefully it doesn’t mean more work for those who need a simple solution.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘DFP Ad Manager and Google DFP ad tags?’ is closed to new replies.