0
I’m having a hard time registering this style library: https://fonts.googleapis.com/css?family=Rajdhani
functions of wordpress. Can help me?
0
I’m having a hard time registering this style library: https://fonts.googleapis.com/css?family=Rajdhani
functions of wordpress. Can help me?
0
You can make use of the following function:
wp_enqueue_style( string $handle, string $src = '', array $deps = array(), string|bool|null $ver = false, string $media = 'all')
In $deps
, you need to pass an array of already registered styles that the current style depends on, so you need to register this css and then record your page style and configure the source as dependency on page style.
Example:
wp_enqueue_style('fonts', 'https://fonts.googleapis.com/css?family=Rajdhani');
wp_enqueue_style('main', '/file/path/', ['fonts']);
Browser other questions tagged wordpress function
You are not signed in. Login or sign up in order to post.