Created
May 14, 2021 18:51
-
-
Save racmanuel/3e455fa0c4b17fe0e50af5b811424270 to your computer and use it in GitHub Desktop.
Get a specific URL and Enqueue a Style in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = $_SERVER["REQUEST_URI"]; | |
$iscategorymarketplace = strpos($url, 'marketplace'); | |
if ($iscategorymarketplace == true) { | |
//url contains 'marketplace' | |
wp_enqueue_style('marketplace_cat', get_stylesheet_directory_uri() . '/assets/css/marketplace-category.css', array(), '1.0', 'all'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment