{"id":674,"date":"2007-09-03T21:35:58","date_gmt":"2007-09-03T19:35:58","guid":{"rendered":"http:\/\/planetozh.com\/blog\/my-projects\/wordpress-plugin-who-sees-ads-control-adsense-display\/who-sees-ads-example-display-rules\/"},"modified":"2007-09-03T21:40:58","modified_gmt":"2007-09-03T19:40:58","slug":"who-sees-ads-example-display-rules","status":"publish","type":"page","link":"https:\/\/planetozh.com\/blog\/my-projects\/wordpress-plugin-who-sees-ads-control-adsense-display\/who-sees-ads-example-display-rules\/","title":{"rendered":"Who Sees Ads : Example Display Rules"},"content":{"rendered":"<p>Here are a few example of display rules you can use with the plugin <a href=\"http:\/\/planetozh.com\/blog\/my-projects\/wordpress-plugin-who-sees-ads-control-adsense-display\/\">Who Sees Ads<\/a><\/p>\n<h2>I. Simple rules<\/h2>\n<p>These rules use &quot;core&quot; conditions that are enabled by default. To understand the logical flow, read rules in ascending order and mentally insert &quot;<em>otherwise<\/em>&quot; between each. <\/p>\n<h3>1) Display ads on older posts<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_1.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>2) Display ads for everybody except regular readers<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_2.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>3) Display for Search Engines visitors and on older posts, but never for regular readers<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_3.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>4) Display for everybody except regular readers and logged in users<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_4.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>5) Display for one month only<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_5.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>6) Display 2000 times only<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_6.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h2>II. Advanced rules<\/h2>\n<p>If you have the guts or need even more flexibility, edit the beginning of the plugin to have the following:<\/p>\n<div id=\"ig-sh-1\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">php<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"php\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #000088\">$wp_ozh_wsa<\/span><span style=\"color: #009900\">&#091;<\/span><span style=\"color: #0000ff\">'iknowphp'<\/span><span style=\"color: #009900\">&#093;<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #009900;font-weight: bold\">true<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n<p>This will enable advanced condition where you can use PHP code and function calls. Be warn: from now on, you&#39;re on your own and can break things :)<\/p>\n<h3>7) Display on home page only<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_7.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>8) Display everywhere except on home page<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_8_1.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p>Or, this is the same :<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_8_2.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>9) Display 30% of the time<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_9.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h3>10) Display only to US readers<\/h3>\n<p>Feeling the need to geotarget your content? For this, you will need first to install the (excellent) plugin <a href=\"http:\/\/planetozh.com\/blog\/2004\/08\/ip-to-nation-plugin\/\">IP to Nation<\/a>. Then, simply create a context with the following rule:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_10.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h2>III. Hurt Me Plenty<\/h2>\n<p>Still not convinced ? Or you need <em>even<\/em> more flexibility and power ? Dude. What about creating rules that make several ads interact then ?<\/p>\n<h3>11) Show Ad 1 30% of the time, Ad 2 70% of the time<\/h3>\n<p>Create two contexts : <strong>ad1<\/strong> and <strong>ad2<\/strong>.<\/p>\n<p>Context <strong>ad1<\/strong> would be:<br \/>\n<img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_11.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p>Context <strong>ad2<\/strong> would then be:<br \/>\n<img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_11b.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p>Now, simply insert context ad1 in your pages or post. Awesome, isn&#39;t it.<\/p>\n<h3>12) Show Ad1 1000 times, then Ad2 1000 times, then Ad3 1000 times<\/h3>\n<p>Create 3 contexts and their code, named <strong>ad1<\/strong>, <strong>ad2<\/strong> and <strong>ad3<\/strong>, with the following rules :<\/p>\n<p><strong>ad1<\/strong>:<br \/>\n<img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_12_1.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p><strong>ad2<\/strong>:<br \/>\n<img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_12_2.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p><strong>ad3<\/strong>:<br \/>\n<img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_12_3.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<p>Then insert context <strong>ad3<\/strong>.<\/p>\n<h3>13) Let&#39;s get a bit crazy<\/h3>\n<p>You can of course create the most complex display rules if you really need them. Like: on single post pages, always display to Search Engines visitors, display on old posts excepts if visitor is not a regular reader, but above all, never display ads to yourself ? Weeeeeeeee:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/planetozh.com\/blog\/images\/who_sees_ads\/rules_13.gif\" alt=\"Who Sees Ads\" \/><\/p>\n<h2>IV. Conclusion<\/h2>\n<p><a href=\"http:\/\/planetozh.com\/blog\/my-projects\/wordpress-plugin-who-sees-ads-control-adsense-display\/\">Who Sees Ads<\/a> is the <b>Ultimate Ad Management plugin<\/b>, I hope you&#39;re convinced by now.<\/p>\n<p>You can use it, of course, to display quite everything, not just ads: greetings, help messages, temporary notices, images, text. Anything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are a few example of display rules you can use with the plugin Who Sees Ads I. Simple rules These rules use &quot;core&quot; conditions that are enabled by default. To understand the logical flow, read rules in ascending order and mentally insert &quot;otherwise&quot; between each. 1) Display ads on older posts 2) Display ads [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":639,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-674","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/pages\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/pages\/674\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/pages\/639"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}