1. Home
  2. Docs
  3. Conference Pro
  4. Frequently Asked Questions
  5. How to remove select.js from specific pages?

How to remove select.js from specific pages?

To remove select.js file from a specific page, please do the below steps:

1) Open wp-content/themes/conference-pro-child/functions.php

2) Add the below code to the end of the file:

/** To remove select.js from a specific page **/
function child_scripts() {
if(is_page( ‘register’ ) ){

wp_dequeue_script( ‘cpt-select’ );wp_deregister_script(‘cpt-select’);
wp_dequeue_script( ‘cpt-jquery-main’ ); wp_deregister_script(‘cpt-jquery-main’);
wp_register_script(‘cpt-jquery-main-child’, get_template_directory_uri() . ‘/assets/js/jquery.main.js’, array(
), false, true);
wp_localize_script(‘cpt-jquery-main-child’, ‘cptJS’, array(‘ajax_url’ => admin_url(‘admin-ajax.php’), ‘is_fe’ => ef_fe_vue_prop(true, false)));
add_action( ‘wp_enqueue_scripts’, ‘child_scripts’, 100 );

3) Save the file.

This will remove the mentioned jquery file from the page ‘register’ only.

Was this article helpful to you? Yes No