[Plugin: WP-Table Reloaded] Only load on specific pages
-
Hello,
I only use wp-table-reloaded on one page, and would like to prevent it from loading on other pages (it slows down my home page load a bit).I’ve been told I can do something like this (for another plugin):
How would I do this for wp-table-reloaded?Thanks,
tacochampput this in your wp-config.php
define(‘CF7_DATE_PICKER_ENQUEUES’, false);
then in your theme’s functions.php file you have two options:
if (is_page(‘Form page’)) {
if (class_exists(‘CF7DatePicker’))
add_action(‘wp_enqueue_scripts’, array(‘CF7DatePicker’, ‘plugin_enqueues’));
}or create an action
function cf7dp_enqueues() {
if (is_page(‘Form page’)) {
if (class_exists(‘CF7DatePicker’))
CF7DatePicker::plugin_enqueues();
}
}
add_action(‘init’, ‘cf7dp_enqueues’);https://www.ads-software.com/extend/plugins/wp-table-reloaded/
- The topic ‘[Plugin: WP-Table Reloaded] Only load on specific pages’ is closed to new replies.