• I want to change the class name “container” to “container-fluid” in my whole website. How to do it? please reply me fast as early as possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Post your site address

    Hello payaltanna,
    Create a js file named as “replace-class.js” and put in js folder within assets folder .
    Now add this code in “replace-class.js” file .

    jQuery(document).ready(function($){
    $('.container').addClass('container-fluid').removeClass('container');
    });

    Now add this code in theme functions.php file

    function themes_scripts() {
    wp_enqueue_script( 'replace-class', get_template_directory_uri().'/assets/js/replace-class.js', '', '', true );
    }
    add_action( 'wp_enqueue_scripts', 'themes_scripts' );

    Hope this will be helpful.
    Thanks

    Thread Starter payaltanna

    (@payaltanna)

    Thanks cedcommerce for your helpful reply

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to change the class name’ is closed to new replies.