• Resolved ieuan1

    (@ieuan1)


    Hi there,

    Is there a way of removing the call to the external stylesheets? I already have fontawesome installed in my theme and I can copy the google fonts into my stylesheet.

    The two external stylesheets that are being loaded are:

    simple-job-board-bootstrap-css
    simple-job-board-google-fonts-css

    Thank you!

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

    (@presstigers)

    @ieuan1,

    Please add the following code in your activated theme’s functions.php file:

    
    /**
     * Dequeue SJB Styles
     */
    function sjb_dequeue_styles( ) { 
        wp_dequeue_style('simple-job-board-bootstrap');
        wp_dequeue_style('simple-job-board-google-fonts');
    }         
    
    add_action( 'wp_print_styles', 'sjb_dequeue_styles');
    
    

    Thank you for writing to us. Let us know if you need any further assistance.

    Kind Regards,
    PressTigers

    @presstigers

    Plase, note that since WordPress 3.3 wp_print_styles should not be used to enqueue styles or scripts. (see: http://make.wordpress.org/core/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/)

    Plugin Author PressTigers

    (@presstigers)

    Hello @zarko-jovic,

    In your referenced link, it is mentioned that not to use “wp_print_styles” for enqueueing styles or scripts.

    In our case, we are providing this solution at theme level for dequeuing plugin’s styles that are already enqueued in a plugin.

    This action fires before styles in the $handles queue are printed. So, if you read the documentation of “wp_print_styles” then things will be more clear to you.

    Thanks & Regards,
    PressTigers

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘External Stylesheets’ is closed to new replies.