Only on the page that has the subscribe button
-
Hello,
I want to load the plugin only on the page that has the subscribe button. Would it be possible to hook into this?
function dequeue_email_subscribers() {
if (!is_page(‘subscribe-now’)) {
wp_dequeue_script(’email-subscribers-script-handle’);
wp_dequeue_style(’email-subscribers-style-handle’);
}
}
add_action(‘wp_enqueue_scripts’, ‘dequeue_email_subscribers’, 100);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Only on the page that has the subscribe button’ is closed to new replies.