{"id":25585,"date":"2013-10-08T14:58:09","date_gmt":"2013-10-08T14:58:09","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/p2-header-ad\/"},"modified":"2018-05-12T14:12:21","modified_gmt":"2018-05-12T14:12:21","slug":"p2-header-ad","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/p2-header-ad\/","author":1424004,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.7","stable_tag":"1.7","tested":"4.9.29","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"P2 Header Ad","header_author":"Jay Versluis","header_description":"","assets_banners_color":"f7f7f7","last_updated":"2018-05-12 14:12:21","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=34B76TPRWMWAE","header_plugin_uri":"https:\/\/wpguru.co.uk","header_author_uri":"https:\/\/wpguru.co.uk","rating":5,"author_block_rating":0,"active_installs":10,"downloads":5172,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"993909","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"993909","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"993909","resolution":"1544x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"993909","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"784586","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"993909","resolution":"2","location":"assets"}},"screenshots":{"1":"see your ad displayed on the P2 front page","2":"the Admin Interface let's you paste HTML code quickly and easily (under Appearance - P2 Header ad)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2557,2563,1214,1431,38000],"plugin_category":[35],"plugin_contributors":[80014],"plugin_business_model":[],"class_list":["post-25585","plugin","type-plugin","status-publish","hentry","plugin_tags-ad","plugin_tags-advert","plugin_tags-code","plugin_tags-header","plugin_tags-p2","plugin_category-advertising","plugin_contributors-versluis","plugin_committers-versluis"],"banners":{"banner":"https:\/\/ps.w.org\/p2-header-ad\/assets\/banner-772x250.png?rev=993909","banner_2x":"https:\/\/ps.w.org\/p2-header-ad\/assets\/banner-1544x500.png?rev=993909","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/p2-header-ad\/assets\/icon-128x128.png?rev=993909","icon_2x":"https:\/\/ps.w.org\/p2-header-ad\/assets\/icon-256x256.png?rev=993909","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/p2-header-ad\/assets\/screenshot-1.png?rev=784586","caption":"see your ad displayed on the P2 front page"},{"src":"https:\/\/ps.w.org\/p2-header-ad\/assets\/screenshot-2.png?rev=993909","caption":"the Admin Interface let's you paste HTML code quickly and easily (under Appearance - P2 Header ad)"}],"raw_content":"<!--section=description-->\n<p>Once installed, head over to Appearance - P2 Header Ad and paste your ad code into the box.<\/p>\n\n<p>Features:<\/p>\n\n<ul>\n<li>preview your ad in the admin interface (see screenshots)<\/li>\n<li>option to hide the ad for logged-in users<\/li>\n<li>option to hide the ad for logged-in WP eMember users<\/li>\n<li>works with and without a header image<\/li>\n<li>option to show the same ad after the post content<\/li>\n<\/ul>\n\n<p>I've optimised the plugin for a 468x80 pixel ad. Other sizes will work but may require your own CSS tweaks to make them look right.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Either: Upload the entire folder to <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Or: download the ZIP file, then head over to Plugins - Add New - Install, then browse to your file<\/li>\n<li>Or: from Plugins - Add New, search for this plugin and hit \"install\"<\/li>\n<li>Then: Activate it through the 'Plugins' menu in WordPress<\/li>\n<li>Under Appearance - P2 Header Ad you'll find an admin interface to paste your HTML code<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Either: Upload the entire folder to <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Or: download the ZIP file, then head over to Plugins - Add New - Install, then browse to your file<\/li>\n<li>Or: from Plugins - Add New, search for this plugin and hit \"install\"<\/li>\n<li>Then: Activate it through the 'Plugins' menu in WordPress<\/li>\n<li>Under Appearance - P2 Header Ad you'll find an admin interface to paste your HTML code<\/li>\n<\/ol><\/dd>\n<dt>I'm using a different ad size than 468x80 pixels. How do I tweak the CSS?<\/dt>\n<dd><p>P2 Header Ad will wrap your code inside a DIV tag with the ID \"p2HeaderAd\". Simply re-position by targeting this ID.<\/p>\n\n<p>You can do this either in your Theme's styles.css file, or tweak p2-header-ad-styles.css inside the plugin's main directory.<\/p><\/dd>\n<dt>Will this plugin work with a custom header graphic?<\/dt>\n<dd><p>Yes, it sits on top of your custom header graphic. It will adjust its height automatically so it should always look nice.<\/p><\/dd>\n<dt>I'm using Google Adsense ads, but they don't show up. What gives?<\/dt>\n<dd><p>It takes about half an hour for fresh Google ads to appear. Until then you'll only see a blank space. Grab a coffee and check back a little later.<\/p><\/dd>\n<dt>I'm showing ads on the front page after the post content - but now the header ad is gone. What's up with that?<\/dt>\n<dd><p>Google ads can only be shown up to 5 times on a single page. If your front page shows 5 posts or more, then the ad can no longer be displayed in the header (which is called last for performance reasons).<\/p>\n\n<p>If you want to use the after-content-front-page-ad feature, and you want the header to show first, you can tweak line 293 of the main plugin file (p2-header-ad.php) from this<\/p>\n\n<p>add_action ('get_footer', 'p2DisplayAdvert');<\/p>\n\n<p>to<\/p>\n\n<p>add_action ('get_header', 'p2DisplayAdvert');<\/p>\n\n<p>I may make this an option in the admin interface in a future update.<\/p><\/dd>\n<dt>I'm getting a nasty deprecation warning in DEBUG mode...?<\/dt>\n<dd><p>This is caused by the P2 theme, not by the plugin. As soon as this is fixed in P2, this message will disappear.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.7<\/h4>\n\n<ol>\n<li>fixed a warning that made PHP assume a non-existent constant instead of a function<\/li>\n<li>verified compatibility with WordPress 4.9.5<\/li>\n<\/ol>\n\n<h4>1.6<\/h4>\n\n<ol>\n<li>styles are now loaded via wp_enqueue_scripts hook<\/li>\n<li>fixed a debug warning that assumed a constant rather than a value<\/li>\n<\/ol>\n\n<h4>1.5<\/h4>\n\n<ol>\n<li>added option to display the same ad at the end of single posts<\/li>\n<li>added option to hide ads at the end of front-page\/blog-page posts<\/li>\n<\/ol>\n\n<h4>1.4<\/h4>\n\n<ol>\n<li>added the option to hide ad when users are logged into eMember (plugin by Tips and Tricks HQ)<\/li>\n<\/ol>\n\n<h4>1.3<\/h4>\n\n<ol>\n<li>added translation readiness<\/li>\n<li>added German Translation<\/li>\n<li>added Spanish Translation (thanks to Andrew Kurtis)<\/li>\n<\/ol>\n\n<h4>1.2<\/h4>\n\n<ol>\n<li>tweaked placement of advert: now it's fixed to the header<\/li>\n<li>added funky fade-in effect when the site loads<\/li>\n<\/ol>\n\n<h4>1.1<\/h4>\n\n<ol>\n<li>added option to remove the ad for logged-in users<\/li>\n<\/ol>\n\n<h4>1.0<\/h4>\n\n<ol>\n<li>initial Release<\/li>\n<\/ol>","raw_excerpt":"Places a 468x80 pixel advert inside the header of Automattic&#039;s wonderful P2 Theme.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/25585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=25585"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/versluis"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=25585"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=25585"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=25585"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=25585"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=25585"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=25585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}