• Resolved ducod

    (@ducod)


    Hi,

    I tried to use this code to disable rate-my-post.js on certain pages, but it seems it didn’t work, I need the plugin to be worked only on blog posts and portfolios where I manually implemented the plugin.

    function removeScripts() {
    	if(is_page('contact', 'about')  || is_front_page()){
        wp_deregister_script( 'rate-my-post' );
      }
    }
    ?
    add_action( 'wp_footer', 'removeScripts' );

    Please give me a hand, thank you.

Viewing 1 replies (of 1 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hmm, that should work. Did you clear cache after adding the code?

    Otherwise try adding priority to 1000 or so. add_action( ‘wp_footer’, ‘removeScripts’, 1000 );

    Regards,
    Blaz

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove rate-my-post.js on Pages?’ is closed to new replies.