Okay
  Public Ticket #1750810
Content carousel - enqueueing scripts and CSS
Closed

Comments

  • Frédéric Jacquemin Véber started the conversation

    Hi,

    I used your plugin with a Wordpress website. I'd like to modify CSS and javascript but my CSS and javascript files from my theme child are enqueued before your plugin files. So my modifications are compromised.

    Here the code I use to enqueue my scripts in function.php file :

    if ( !function_exists( 'child_theme_configurator_css' ) ):
        function child_theme_configurator_css() {
            wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css'/*, array( 'mkhb-render','theme-styles','mkhb-row','mkhb-column','mkhb-logo','mkhb-navigation','mkhb-search','mkhb-shop-cart' )*/ ); 
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 40 );

    // END ENQUEUE PARENT ACTION

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1001);

    function theme_enqueue_styles() {

    $js_directory = get_stylesheet_directory_uri() . '/js/';
    wp_register_script( 'ozjs', $js_directory . 'ozjs.js', 'jquery', '1.0' );
    wp_enqueue_script( 'ozjs' );

    }


    Is it possible to enqueue my files after yours? if yes, how?

    I saw I could parameter the plugin in admin interface, but I'd like to keep my code in extern files.

  •   Max replied privately
  • Frédéric Jacquemin Véber replied

    Hi max,

    Thanks for your help. Unfortunately, it seems not to work. I tried 10000, but no consequence.

  •   Max replied privately