• Resolved titush

    (@titush)


    Hi everyone,

    I have a question regarding the CSS that is rendered by the responsive slider. I don’t want any CSS code in my source code, as I would prefer to have the entire site CSS in a single file. So far I have succeeded, however the responsive slider still outputs CSS in the source code of the homepage:

    <style type="text/css">
    			.slide-excerpt { width: 50%; }
    			.slide-excerpt { bottom: 0; }
    			.slide-excerpt { right: 0; }
    			.flexslider { max-width: 520px; max-height: 305px; }
    			.slide-image { max-height: 305px; }
    		</style>
    		<style type="text/css">
    			@media only screen
    			and (min-device-width : 320px)
    			and (max-device-width : 480px) {
    				.slide-excerpt { display: none !important; }
    			}
    </style>

    Is there anything I can do to prevent this, possibly without modifying any core plugin files?

    Thanks, Titus

    https://www.ads-software.com/extend/plugins/genesis-responsive-slider/

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can copy the code there and put it in your, or in a separate CSS file, at least when you make use of a Child Theme.

    Then, it’s in there twice.

    To get it out of the plugin, you’ll have to edit the plugin files. Find it and take or comment it out.

    Of course that is not the best way. When your plugin is updated by the author, your customizations get overwritten. Can you get in contact with the author and ask him to add it in a CSS-file in his plugin, instead of dumping it in your code? That would be the best, also for other users.

    Thread Starter titush

    (@titush)

    Hi and thanks for your quick reply. Yes, I figured what you outlined above, and, as you say, I’d prefer the CSS to be in a separate file, so that I can minify it…

    I’ll try and get in touch with them over at studiopress..

    Thread Starter titush

    (@titush)

    Actually, I just checked over at studiopress and they are referring to this page for support so I hope a programmer over there sees this post.

    Thanks, Titus

    Plugin Support Jen Baumann

    (@dreamwhisper)

    This should work in your functions.php file:

    add_action( 'after_setup_theme', 'custom_slider_init', 16 );
    /**
     * Make amendments to the Genesis Slider, after it has been fully initialised.
     *
     * @since 1.0.0
     */
    function custom_slider_init() {
    	remove_action( 'wp_head', 'genesis_responsive_slider_head', 1 );
    }

    Plugin Support Jen Baumann

    (@dreamwhisper)

    Note that removes what is added to the head. It doesn’t create a separate CSS file, obviously. You’ll have to add whatever CSS you need to another file.

    Thread Starter titush

    (@titush)

    Hi, thanks for that, it solved the problem. Any chance that this could be included in future versions of the script, given the everlasting dedication of studiopress to be the most SEO compliant theme framework?

    Thanks ??

    Plugin Support Jen Baumann

    (@dreamwhisper)

    You’re welcome. I can’t really speak to an external css file being included in a future version, but just remember that if you want to make changes to some of the slider settings, you’ll need to do it in the css now rather than the settings ??

    Thread Starter titush

    (@titush)

    Yeah, that’s o.k. I appreciate your support. I really dislike when scripts or plugins clutter my index.php with css ??

    And so does Google ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS displayed in page, can we move this to another CSS file?’ is closed to new replies.