anonymized-13749270
(@anonymized-13749270)
wp_enqueue_scripts is for queuing scripts only, not adding custom messages and markup comments I think. You could use wp_head instead, as you want to include the HTML comment:
function techpro_styles() {
?>
<!-- Google Fonts -->
<link rel="stylesheet" id="opensans" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800?ver=<?php echo get_bloginfo('version'); ?>" type="text/css" media="all" />
<link rel="stylesheet" id="lato" href="//fonts.googleapis.com/css?family=Lato:400,300,400italic,700,300italic?ver=<?php echo get_bloginfo('version'); ?>" type="text/css" media="all" />
<?php
}
add_action('wp_head', 'techpro_styles');
Thanks, that makes perfect sense. I appreciate the help!
anonymized-13749270
(@anonymized-13749270)
You’re welcome, glad it helped 🙂
(@desaad37)
10 years, 11 months ago
Is it possible to add HTML comments above styles that are registered and enqueued?
I tried doing it like this but it ends up adding the comment above the whole list of styles instead of just above the font style additions.