WordPress.org

Ready to get started?Download WordPress

Forums

WP Category Post List Widget
deregister styles (3 posts)

  1. Bob33
    Member
    Posted 1 year ago #

    Hi there,
    Any way of finding out the handles for the enqueued css for this plugin eg 'light theme' etc as I'm not using them and would like to deregister them.
    I'm also having an issue with setting the css from within the widget - each time it's opened the css on the drop down resets to 'light theme' and I'm having to tell the client to reselect 'no css'.
    Many thanks for this plugin.

    http://wordpress.org/extend/plugins/wp-category-posts-list/

  2. Bob33
    Member
    Posted 1 year ago #

    OK worked it out - this removes all styles except the base style (thus removing unused stuff from the <head>):

    function my_deregister_styles() {
    wp_deregister_style( 'wp_cpl_css_0' );
    wp_deregister_style( 'wp_cpl_css_1' );
    wp_deregister_style( 'wp_cpl_css_2' );
    wp_deregister_style( 'wp_cpl_css_3' );
    }
    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );

    Still curious about the resetting drop down menu for selecting styles.

  3. Daiku
    Member
    Posted 1 year ago #

    Bob33,

    Thank you SO MUCH for the deregister code. As you, I don't want any of the predefined styles of the plug-in and it was driving me nuts trying to get rid of them (the checkbox 'Use Default CSS' seems to have no effect, nor does checking or unchecking the boxes for the individual themes). Finally, I can start with a clean slate and do styles myself. The ability to filter posts by category on a page is great, but the default styles seem like extra baggage.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.