Video není dostupné.
Omlouváme se.
Wordpress - Easily Add Code Snippets to the Header and Footer
Vložit
- čas přidán 23. 01. 2020
- UPDATE February 3, 2021: As was pointed out by a kind viewer, the plugin seems to not be working with the latest version of WordPress. Try the following plugin instead which has been updated, and follow the rest of the tutorial otherwise.
en-ca.wordpress.org/plugins/i...
In this video I'll show you an incredibly simple and useful plugin that'll allow you to add code snippets to your header and footer.
Whether it's pop-ups, Google Analytics, Facebook Pixel, Pinterest or others, you'll often be asked to add a small code snippet to the header or footer of your website.
This can be daunting if you aren't very familiar with coding, however, with the simple Header Footer Code Manager (HFCM) from 99Robots, you can quickly and easily add any number of snippets to your site.
Even better, you can control whether they are active, or even which pages they appear on.
wordpress.org/plugins/header-...
Your video has a calming effect. It felt good👍.
Great to hear! Thanks for letting me know!
Nice, clear and simple...
Thanks so much!
Thank you so much. This tutorial is great. I'm curious what the shortcodes are for? Any idea when/how those would be used or if they're even needed?
Thanks so much. The shortcode allows you to place the code snippet you add anywhere on the site. So, if in a blog post or in a page you wanted to place a code for, say, a pop-up, you could just use the shortcode. Hope that helps!
Thank you so much..its nice and simple
You are welcome 😊
Thanks man.... Very useful information ❤ I have a short code for tracking plugin.... I use Astra Theme, in Astra there is no option to add short code.... Can I use this method to add that short code to header and the tracking box can appear in the header?
Yep, it should work exactly for that. I have used it a number of times to add tracking codes. Give it a try and check if it's tracking and confirmed. Good luck!
@@JustEnoughDesign Thanks bro
Thanks man! You made it soooo simple! Straight to the point! Awesome!!! What else do you teach?? ;)
I'm really glad that helped! If you check out my channel you'll see I have some Wordpress tutorials, and videos showing how to improve the design of any of your work! Hope you'll take a look!
great value, ty
i tried to add code like that but there was a problem in script so i remove the script but its still showing as text code on top of every page can you let me know what to do ?
It may be a caching issue, where it's only seen by you. To check, try viewing the problem page in a different browser, or in Private Mode.
If it's still showing, consider deactivating or deleting the plugin to try and clear it out.
Thanks for sharing!
My pleasure!
That's a great teaching, but please sir i just did it for popads and popcash ads but I have not seen any ad yet. Please can you help?
Thank you sir.
You are very welcome!
Hello, my name is Ayrton and I thank you for the valuable content you offer, just a question. How to install pixel from FB to this plugin?
Hey Ayrton! This plugin works great for installing the Facebook Pixel. Get a Facebook Pixel following these instructions: facebook.com/business/help/952192354843755?id=1205376682832142
Then use the plugin to add it to the Header, and ensure it's for the entire site.
Nice tutorial. I tried this morning and it does not appear to be working with current version of WP.
It seems you are very right about that, and seems the developers haven't updated it for the latest version. Until they do, check out the following plugin that has been updated and I've used on some sites with good success: en-ca.wordpress.org/plugins/insert-headers-and-footers/
Can this also be used to add custom CSS to specific pages/posts? Or should I use separate plugin for that.
Yes you should be able to do that. You can enter any code, so if you wrap your css in the and include it in the header, it should be recognized. Then, you can choose specific pages / posts where it'd be applied.
A bit more of a manual approach would be to target the specific body class for a tag. If you Inspect the page, or look at the Page Source, the body will have a class like "page-id-123". You can then write some css (in Customize or elsewhere) something like
.page-id-389 h1{
color: #333333;
}
...and it will only show on that page.
Give it a shot, and if you have any issues just reach out.
@@JustEnoughDesign Very helpful. Thank you so much for taking the time to reply in detail. :)
@@JustEnoughDesign The page id trick did not work with my theme customizer; it still loaded the css code everywhere but in the front-end it was working rightly. This header, footer code manager did the job well.
@@Rupamforever Glad to hear! Cheers to some great looking websites!
@@JustEnoughDesign Can I use this plugin to add function.php code? or should I use a separate plugin for
After adding the code through this plugin, can we delete the plugin?
I do not believe so, no. The plugin seems to inject the code when the website is loaded up, so I think removing the plugin would remove the added code.