WordPress.org

Support

Support » Plugins and Hacks » [Resolved] “if” to hide this plugin when deactivated?

[Resolved] “if” to hide this plugin when deactivated?

  • Can someone show me the right code? I’m trying to do what’s called Hiding Plugins When Deactivated, in my sidebar template.

    The plugin code I want to check-for is php echo getad(‘rotate-covers’) to prevent an error in my sidebar when Ad Rotator plugin is deactivated. I tried the code below and it didn’t seem to work,

    <?php
    if (function_exists('getad')) {
      echo getad('rotate-covers'); ?>

    How do I do the “if” check for this plugin example?

Viewing 2 replies - 1 through 2 (of 2 total)
  • opened braces are not closed…
    is that it ?

    That was it, thank you. I didn’t know enough about the PHP to recognize that, but you’re right. It works!

    <?php
    if (function_exists('getad')) {
      echo getad('rotate-covers'); } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] “if” to hide this plugin when deactivated?’ is closed to new replies.
Skip to toolbar