• Resolved Will Stocks

    (@willstockstech)


    Hey Frank! ๐Ÿ™‚

    Quick question – I’ve always assumed that AO fires after everything else, therefore if I conditionally enqueue assets, does AO only concat them for that given page?
    Example:
    if(!is_single) {
    wp_enqueue_style(‘style-name’, get_stylesheet_uri());
    }

    So in theory, I wouldn’t then see styles from that stylesheet on say, my homepage?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    I wouldnโ€™t then see styles from that stylesheet on say, my homepage?

    correct ๐Ÿ™‚

    Thread Starter Will Stocks

    (@willstockstech)

    Ahhh, nice one – thanks Frank!

    Also, can I be super cheeky – you don’t have a “simple” htaccess that re-writes to .gz do you? I’m going to hook into the “pre-zip” function rather than handling on-the-fly but htaccess ALWAYS seems to go wrong when I write it!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Don’t use it myself and haven’t tested it, but https://stackoverflow.com/a/9158330/237449 seems to have some example config that looks sane?

    Thread Starter Will Stocks

    (@willstockstech)

    Ahhhh, nice one thanks Frank! I wasn’t really sure what to search for haha! ๐Ÿ™‚

    Stackoverflow to the win once again

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

The topic ‘Question – wp_enqueue_*’ is closed to new replies.