-
Author
-
March 8, 2017 at 15:24 #155051tonariParticipant
Hello, i would like to load the font awesome localy and not from maxcdn.bootstrapcdn.com .
I saw this hook on another post and i think i can use it to point to a local file :function hook_fa_45() {
$output = “<link rel=”stylesheet” href=”mywebsiteurl/css/font-awesome.min.css”/>”;
echo $output;
}
add_action(‘wp_head’, ‘hook_fa_45’);But i also want to remove the head part where it go to the bootstrap cdn.
I don’t want to have two link like this in the head :COPY CODE<<span class="start-tag">link</span> <span class="attribute-name">rel</span>='<a class="attribute-value">stylesheet</a>' <span class="attribute-name">id</span>='<a class="attribute-value">awesome-style-css</a>' <span class="attribute-name">href</span>='<a class="attribute-value">//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css?ver=4.3.0</a>' <span class="attribute-name">type</span>='<a class="attribute-value">text/css</a>' <span class="attribute-name">media</span>='<a class="attribute-value">all</a>' /> <<span class="start-tag">link</span> <span class="attribute-name">rel</span>='<a class="attribute-value">stylesheet</a>' <span class="attribute-name">id</span>='<a class="attribute-value">awesome-style-css</a>' <span class="attribute-name">href="mywebsiteurl/css/font-awesome.min.css"/></span>' <span class="attribute-name">type</span>='<a class="attribute-value">text/css</a>' <span class="attribute-name">media</span>='<a class="attribute-value">all</a>' /> How can i do that ?
Thanks.
Regards.March 9, 2017 at 00:04 #155142LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happyΒ to help you π
March 9, 2017 at 17:41 #155221RaduModeratorHi,
Please try this function
COPY CODEfunction remove_asd_font_awesome() { wp_dequeue_style('font-awesome'); } add_action('after_setup_theme', 'remove_asd_font_awesome');
The function needs to be pasted in wp-content/themes/kleo-child/functions.php
Let me know
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 9, 2017 at 18:26 #155229tonariParticipantHi Radu,
thanks π
So i need to use both your code and mine ?
To add the font-awesome.min.css from my local serveur and to remove the one from the CDN maxcdn.bootstrapcdn.com ?March 9, 2017 at 18:31 #155230RaduModeratoryes both
Let me know
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 9, 2017 at 18:49 #155246RaduModeratorYou should what plugin load that to the website, if you de-activate all plugins this will continue to load ? if not activate plugins back one by one and check to see what load that thru the website
Let me know
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 9, 2017 at 19:00 #155247tonariParticipantGreat i found the plugin! I thought that was a kleo part sorry.
I edited the plugin to load the local file, that’s ok thanks.
Regards. πMarch 9, 2017 at 19:05 #155249RaduModeratorGreat
Have a nice day
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.