Enables the previous "classic" editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports all…
About Head & Footer Code
The Head & Footer Code plugin allows you to easily add custom code snippets to your WordPress site without needing programming skills. You can add code to the head, body, or footer sections of your site, including popular snippets like Google Analytics, Facebook Pixel, or site verification codes. The plugin also offers specific code options for the homepage, individual articles, and categories, making it versatile for customizing different parts of your website.Screenshots








Frequently asked questions
What kind of code snippets can I add with this plugin?
You can add custom code snippets such as JavaScript, CSS, or HTML. This includes code for Google Analytics 4, Google Tag Manager, Facebook/Meta Pixel, and various site verifications.
Where can I insert custom code using this plugin?
You can insert custom code within the <head> section, right after the opening <body> tag, or just before the closing </body> tag. The plugin utilizes WordPress hooks like wp_head, wp_footer, and wp_body_open.
Can I add code specific to individual articles or categories?
Yes, you can add article-specific code using a Metabox when editing posts or pages. Category-specific code can also be defined for individual categories.
How do I access the plugin's settings?
You can access the plugin settings by navigating to Tools > Head & Footer Code in your WordPress Dashboard.
Changelog
1.5.9 (2026-08-31)
- Fix: JSON-LD and other article/category specific code saved before 1.5.8 could show backslash-escaped quotes; display is now corrected automatically without modifying stored post/term meta (thanks @sheenaljain for report)
1.5.8 (2026-08-16)
- Fix: WP Plugin Check errors and warnings
- Test: WordPress 7.1-RC3 and Twenty Twenty-Five 1.5 and Twenty Fifteen 4.2
- Improve: Additional layer of protection for post and taxonomy meta boxes against unpriviledged roles
1.5.7 (2026-04-01)
- Improve: Allow Programmable Search Engine tags (PageMap, DataObject and Attribute)
- Test: WordPress 7.0-RC2
1.5.6 (2026-03-23)
- Fix: update routine 10 infinite loop on sites with huge number of posts (10k+)
- Test: WordPress 7.0-beta6
1.5.5 (2026-03-11)
- Fix: Remove
set_time_limitfromupdate.phpto prevent fatal error on servers where it’s disabled
1.5.4 (2026-03-10)
- New: Add dynamic support for all public taxonomies (eg, Tags, Product Categories)
- Fix: There was no
Settings saved.notification - Fix: Allow
id,dir,classanddata-*attribute forscript,style,linkandiframetags. - Change: Move review CTA to the bottom of the Settings page
- Change: Increased minimum requirements to WordPress 5.2 and PHP 5.6
- Cleanup: Removed
wp_body_openfallback (no longer needed with WP 5.2+ requirement) - Improve: Introduce
Plugin_Infoclass for cleaner constant management - Optimize: Internal code refactoring for better maintainability and naming clarity
1.5.3 (2026-03-07)
- Fix: Allow
displayandvisibilityCSS properties for KSES - Fix: Category specific code was double escaped
- Improve: DRY Front rendering
- Improve: DRY plugin activation handling
- Improve: Post grid custom code indicators
- Improve: Resolve some PCP errors and warnings
- Test: PHP 8.4.15, WordPress 6.9.1, Twenty Twenty-Five 1.4
- Test: PHP 8.5.3, WordPress 7.0-beta3, Twenty Twenty-Five 1.4
- Test: PHP 5.6.20, WordPress 5.2.23, Twenty Ninetin 1.4
1.5.2 (2026-03-04)
- Fix: Allow all W3C standard attributes for iframe
- Test: WordPress 7.0-beta2
1.5.1 (2026-02-23)
- Fix: Code editor missing on categories
- Cleanup: Remove debugging info
- Update: Screenshots
1.5.0 (2026-02-22)
- Test: WordPress 7.0-beta1, Twenty Twenty-Five 1.4, PHP 8.5.3
- Fix: Missing code editor when creating a new article
- Fix: Incorrect use of
- Improve: Security (validate settings save data, better code filtering with included opening SCRIPT and STYLE tags)
- Optimize: Code editor on articles
- Optimize: Settings maintainability
1.4.6 (2025-12-01)
- Test: WordPress 6.9RC3, Twenty Twenty-Five 1.3, PHP 8.4.15
1.4.5 (2025-06-13)
- Fix: Compatibility with Jetpack > Writing > Composing > Compose using shortcode to embed media from popular sites
- Fix: Automatic conversion of false to array is deprecated in update.php
- Test: WordPress 6.8.1, Twenty Twenty-Five 1.2, Jetpack 14.7
1.4.4 (2025-05-31)
- Fix: Relaxed filtering to allow preloadans security/privacy attributes.
1.4.3 (2025-04-30)
- Fix: Relaxed filtering to allow blocks with
<,>,=>characters andtype="application/ld+json"for structured data (rich snippets), following stricter sanitization introduced in 1.4.0.
1.4.2 (2025-04-20)
- Fix: meta tag broken by security introduced in 1.4.0
1.4.1 (2025-04-13)
- Fix: hreflang link broken by security introduced in 1.4.0
1.4.0 (2025-04-12)
- Test: WordPress 6.8-RC3, Twenty Twenty-Five 1.1, Twenty Twenty-Three 1.6, Astra 4.9.2 and PHP 8.3.17
- Test: WordPress 4.9.26, Twenty Seventeen 1.7 and PHP 5.5.38
- Unclutter Settings page
- Improve: Security
- Improve: Refactor and reorganise codebase
- auhfc_settings() -> Techwebux\Hfc\Main::settings()
- auhfc_is_homepage_blog_posts() -> Techwebux\Hfc\Common::is_homepage_blog_posts()
- auhfc_add_to_homepage_paged() -> Techwebux\Hfc\Common::add_to_homepage_paged()
- sanitize_html_classes() -> Techwebux\Hfc\Common::sanitize_html_classes()
- auhfc_allowed_code() -> Techwebux\Hfc\Common::allowed_html()
- auhfc_form_allowed_code() -> Techwebux\Hfc\Common::form_allowed_html()
- auhfc_html2code -> Techwebux\Hfc\Common::html2code()
- auhfc_get_meta() -> Techwebux\Hfc\Common::get_meta()
- auhfc_get_post_type() -> Techwebux\Hfc\Common::get_post_type()
- auhfc_print_sitewide() -> Techwebux\Hfc\Common::print_sitewide()
- auhfc_out() -> Techwebux\Hfc\Common::out()
- auhfc_head_note() -> Techwebux\Hfc\Settings::head_note()
- auhfc_body_note() -> Techwebux\Hfc\Settings::body_note()
