• Hello,
    Using Shadowbox JS version 3.0.3.8
    I’m trying to load a custom css file from my theme as documented on the plugin page. I’ve followed the procedure to the letter (except – read below!) yet shadowbox.css is stubbornly loading from the plugin directory.

    Also the instructions mention a ‘functions.js’ file, does that exist in any WordPress theme? I used functions.php anyway.

    http://wordpress.org/extend/plugins/shadowbox-js/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here…
    Have you found any other solution than editing the plugin files ?
    Tanks in advance
    P.

    Plugin Author Matt Martz

    (@sivel)

    Try placing the code in a new plugin, or a mu-plugin.

    if you create a directory at /wp-content/mu-plugins and create a php file of any name in there and paste in the following code:

    <?php
    function custom_shadowbox_css($url) {
        return get_bloginfo('stylesheet_directory') . '/css/shadowbox.css';
    }
    add_filter('shadowbox-css', 'custom_shadowbox_css');
    ?>

    You will be good to go.

    Hy Matt and thanks for your quick response!

    What i’m trying to do is to add

    function custom_shadowbox_css($url) {
        return get_bloginfo('stylesheet_directory') . '/css/shadowbox.css';
    }
    add_filter('shadowbox-css', 'custom_shadowbox_css');

    in functions.php of my child theme only if the plugin is present and active.

    Well, i think there is some synchronization issue between inc/frontend.php apply_filters call and add_filter in functions.php; do you think it’s possible ?
    Can you give me any tips ?

    Once again, thank’s in advance
    P.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Shadowbox JS] Not loading custom css file’ is closed to new replies.