Skip to content

Instantly share code, notes, and snippets.

@SitesByYogi
Last active December 20, 2022 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SitesByYogi/62e581a2f2223aa1a6978a4ad138d92e to your computer and use it in GitHub Desktop.
Save SitesByYogi/62e581a2f2223aa1a6978a4ad138d92e to your computer and use it in GitHub Desktop.
Add CSS to WordPress using (child) theme's functions.php file or a custom plugin.
<?php
add_action( 'wp_head', 'my_unique_css_func_name' );
function my_unique_css_func_name() {
?><style>
/* Your styles here */
</style><?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment