WordPress.org

Support

Support » Plugins and Hacks » Page-list » [Plugin: Page-list] could it be possible to load the css only on pages where the shortcode is used?

[Plugin: Page-list] could it be possible to load the css only on pages where the shortcode is used?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webvitalii

    @webvitaly

    I was searching how to do this and did not find the solution.
    Anyway I think it is not a big problem because css file is cached and loading only when site is loading for the first time.

    true enough, I just thought I’d ask 🙂

    @ovidiu: If you know which template or page this is going to be loaded on, then I guess it would be possible to use conditional tags in your functions.php file:

    add_action('wp_print_styles','deregister_pagelist_style', 100);
    function deregister_pagelist_style(){
    	if (!is_page_template('page-walk-index.php')) {
    		wp_deregister_style('page-list-style');
    
    	}
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Page-list] could it be possible to load the css only on pages where the shortcode is used?’ is closed to new replies.
Skip to toolbar