![]() |
No Ads for Logged In Members - WP Plugin?
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?
|
I avoid 3rd party plugins. You can use cookies and conditionals to do what you want.
|
Sadly, plugins are a feasible alternative for webmasters who are not programmers. I can imagine this may not be a big deal for someone good with PHP, but that ain't me :(
|
Quote:
prob just a single function to add to only show ads for non members. |
This code will do the trick (insert it right into your WP theme):
Code:
<?php |
Let me give this a try, cyber :D
UPDATE: Would it work if I pasted the code in the widgetized sidebar as "Text"? |
What would be the trick to make it work with widgets? When I use the code in a "Text" widget, it shows nothing when I log out, but displays ;}?> when I log in.
|
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. |
Quote:
http://adrotateplugin.com/page/features.php and if you wanted to disable the ads for logged in users. Code:
function adrotate_shortcode_strip() { |
Quote:
Code:
|
Quote:
Code:
<?php if (isset($_COOKIE['Members'])) { include("members.php"); } ?> |
Quote:
|
All times are GMT -7. The time now is 11:18 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc