• Resolved utnalove

    (@utnalove)


    Hello,

    how can I include in merge and minify files that are directly linked in the <head> section?
    They do not have whatsoever php calls. There is just the direct link to the .css file.

    Thanks

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

    (@launchinteractive)

    Hi,

    In this case you will need to modify your template to enqueue the css and js with php.

    Thread Starter utnalove

    (@utnalove)

    Hi, thanks for your reply.
    I have this line, but it’s not being minified/merged:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

    any idea what may be wrong here?
    I tried to turn off/on plugin, delete cache, but still the same.

    Plugin Author launchinteractive

    (@launchinteractive)

    If you remove that line and add this to your functions.php file it should work:

    function enqueue_scripts(){
    if (!is_admin()) {
    wp_enqueue_style( 'themename', get_stylesheet_uri());
    }
    }
    add_action('wp_enqueue_scripts', 'enqueue_scripts' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to include files in html (without php request)?’ is closed to new replies.