Donncha's "No Ad for Friends" was last updated in 2007 and doesn't work. Does anybody know of a plugin that would block display of ads for logged in members?
No Ads for Logged In Members - WP Plugin?
Collapse
X
-
wouldnt be hard to do, adrotate is a good plugin.
prob just a single function to add to only show ads for non members.Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

Totally Free TemplatesComment
-
This code will do the trick (insert it right into your WP theme):
Or do you want it made as a widget or so?Code:<?php if (!is_user_logged_in()) { echo "your annoying ad is here"; } ?>Obey the CowgodComment
-
If you don't want to make it managed as a widget, you can use it as is. Just insert the mentioned above code into your sidebar.php.
P.S. Fuck and replace your avatar with something neutral according to the GFY rules.Obey the CowgodComment
-
adrotate is a good plugin
http://adrotateplugin.com/page/features.php
and if you wanted to disable the ads for logged in users.
Code:function adrotate_shortcode_strip() { if (!is_user_logged_in()) { remove_shortcode('adrotate'); } } add_filter('the_content', 'adrotate_shortcode_strip');Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

Totally Free TemplatesComment
-
actually if you are using a text widget, you could run a filter on the widget to only show it to non members.
Code:add_filter( 'widget_text', 'non_members' ); function non_members($content = null ) { /* If the user is logged in, return nothing. */ if ( is_user_logged_in() || is_null( $content ) ) return ''; /* Return the content. */ return do_shortcode( $content ); }Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

Totally Free TemplatesComment
-
That works well with the WP login system, but I like to use straight .htaccess (CCBill) with a similar check for a "members" cookie:
Code:<?php if (isset($_COOKIE['Members'])) { include("members.php"); } ?>Comment
-
The double quotes seem to make this code unusable. Because every ad code will contain double quotes somewhere within it, it will break the echo which is exactly what happened when I tried it.Comment

Comment