Finally an easy plugin to add Google Ad Manager (GAM) blocks into WP – shortcode and template function. It was designed to work with a multisite install, please tell me if any problem on a single site install. Thanks!
Simply use [simpledfp_block ad_id=xxxx]
where xxxx
is the id of your DFP ad post type, created when you installed the plugin.
Please use the following code:
if (class_exists('simplegam_main')) {
// checks the plugin is installed
simpledfpBlock(array('ad_id' => xxxx);
}
With, also xxxx
being your Simple GAM Ad id, previously created in wordpress admin panel. You can retrive this ID like this.
I recommend the Reveal IDs plugin.
WWWxHHH
(where WWW is the width of the block, and HHH the height of the block)