• I want to disable some plugins showing on homepage like adblock blocker must not be appear on the homepage, how to do that?

    Please help us.

Viewing 1 replies (of 1 total)
  • Hi, i’ve never done that but i think that you can edit the plugin in this way:

    1) Open the plugin editor,then the the file of the plugin that you want to edit
    2)
    You can write a code like this in the plugin’s file:

    function curPageName() {
     return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
    }
    $current_page_url = curPageName();

    to obtain the url of the page (in your case, if you are in the home page you will get ‘index.php’;
    3) Find the line where you can write something like this:

    if ($current_page_url != 'index.php') {
    // plugin code
    }

    PS: maybe there’s a simpler way to do this but i don’t use wordpress for long time and so I do not know how.

Viewing 1 replies (of 1 total)
  • The topic ‘How to disable/dont show some plugins for Homepage?’ is closed to new replies.