WordPress.org

Ready to get started?Download WordPress

Forums

Page-list
could it be possible to load the css only on pages where the shortcode is used? (4 posts)

  1. Ovidiu
    Member
    Posted 2 years ago #

    could it be possible to load the css only on pages where the shortcode is used?
    its no big issue but it would be nice to have this feature...

    http://wordpress.org/extend/plugins/page-list/

  2. webvitaly
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. Ovidiu
    Member
    Posted 2 years ago #

    true enough, I just thought I'd ask :-)

  4. flick
    Member
    Posted 2 years ago #

    @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');
    
    	}
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic