WordPress.org

Ready to get started?Download WordPress

Forums

Print Button Shortcode
How To Include a css stylesheet? (2 posts)

  1. oneguy
    Member
    Posted 1 year ago #

    Hi There
    I tries to include a style sheet in the plugin but couldn't really do it -
    This is the code I used -

    function wptuts_styles_with_the_lot()
        {
            // Register the style like this for a plugin:
            wp_register_style( 'custom-style', plugins_url( '/css/custom-style.css', __FILE__ ), array(), '20120208', 'all' );
            // or  
    
            // For either a plugin or a theme, you can then enqueue the style:
            wp_enqueue_style( 'custom-style' );
        }
    add_action( 'wp_enqueue_scripts', 'wptuts_styles_with_the_lot' );

    Help?

    http://wordpress.org/extend/plugins/print-button-shortcode/

  2. jasnon
    Member
    Posted 1 year ago #

    I am desperately in need of a solution for this too. This plugin meets all my needs of printing only the content in a specific div but I need to be able to import a style sheet into the print area.

    If the above function didn't work would it be possible to include a stylesheet using something like this?...

    <link rel="stylesheet" href="/styles.css" type="text/css">

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags