[Plugin: Shadowbox JS] How to use own CSS file (5 posts)

  1. CarolineElisa
    Posted 5 years ago #

    Hi there,

    I read in the plugin FAQs that I need to add the following to my theme's functions.php file in order to use my own CSS file for Shadowbox:

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

    That is done. But I'm afraid I do not know where I need to save my new stylesheet for it to be picked up. Or do I need to edit the code above for my needs?

    Thanks in advance for any help you can offer.

  2. roguecat
    Posted 4 years ago #

    I've tried to add the filter as well, but wasn't able to get the custom css to work. I've put my new custom shadowbox in the directory template directory/css/ with no luck.

    Are CarlineElisa and I missing something?

  3. roothost
    Posted 4 years ago #


    I have tried for hours now and it doesn't work for me also.

  4. duepi.biz
    Posted 4 years ago #

    Same for here.

  5. roothost
    Posted 4 years ago #

    Right, not exactly a solution, rather a hack lol.

    I copied the CSS first, the deleted it from the plugin folder....then uploaded with my edits to my css directory and stuck a direct link to it in my header section.

    Not the perfect solution I know, but a quick fix.

Topic Closed

This topic has been closed to new replies.

About this Topic