What Header Footer Code Manager does on your site
Header Footer Code Manager, usually shortened to HFCM, is where you paste the code that third-party services ask for: a Google Analytics or Google Tag Manager tag, a Meta pixel, a Pinterest verification code, a chat widget, a heatmap. Each piece of code becomes a named “snippet” of type HTML, CSS or Javascript, stored in its own database table rather than in your theme. One list shows what loads, where, and who last changed it.
For every snippet you pick the location (header, footer, before or after the content), the pages it runs on (site wide, specific posts, pages, categories, tags or post types, the home page, search, archives, latest posts, or a [hfcm id="…"] shortcode you place by hand), the pages to exclude and the device: desktop, mobile or both. The HFCM admin menu holds the snippet list, the add screen and a Tools screen for import and export.
The plugin is published by DraftPress; the 99 Robots name, used in its official description, still shows up in the code it outputs. The free version handles HTML, CSS and Javascript only. HFCM Pro, sold as a yearly subscription, adds PHP snippets with code validation, a location right after the opening body tag, display rules for logged-in or logged-out visitors, snippet priority, grouping and duplication.
Which sites Header Footer Code Manager suits
HFCM is built for adding analytics and marketing scripts without touching the theme:
- Business sites and blogs with a handful of tracking codes: analytics, domain verification, an ad pixel, each in its own named snippet you can switch off in one click.
- Campaigns with a conversion pixel: page targeting loads the pixel only on the thank-you page, and page exclusions keep a site-wide script away from pages where it gets in the way.
- Small teams and contractors: each snippet records who changed it last and when, which helps when several people run the site.
It is the wrong tool if you want to add PHP for free: the free version does not run any, while WPCode and Code Snippets do in their free versions. It is not the best fit for a full Google Tag Manager setup either, since the noscript part belongs right after the opening body tag, a Pro-only location.
Header Footer Code Manager strengths and limitations
Strengths
- Precise targeting, even for free. Pages, posts, categories, tags, post types, exclusions and device are set per snippet.
- Independent of the theme. Snippets live in the database and survive a theme switch.
- Accountability. Each snippet keeps the user who created it, the user who last edited it, and the date.
- A minimal interface. One list, one form, one import and export screen: there is almost nothing to learn.
Limitations
- No PHP in the free version. PHP snippets and their validation are Pro features, while WPCode and Code Snippets include them for free.
- No location after the opening body tag. That insertion point, which some services require, is Pro-only.
- Snippet names are public. Each snippet is wrapped in an “HFCM by 99 Robots” HTML comment that includes its number and name.
- Import and export are meant for the same site. The developer warns that moving snippets to another site can behave inconsistently when they target pages, posts, categories or tags.
- Uninstalling wipes everything. Deleting the plugin drops its table, and with it every snippet.
The Header Footer Code Manager settings we recommend
HFCM has almost no global settings: most decisions happen in each snippet’s form, under HFCM > Add New.
| Setting | Recommended value | Why |
|---|---|---|
| Snippet Name HFCM > Add New | The service and its purpose (“Meta pixel, thank-you page”), nothing internal | The name appears in the page source of every page where the snippet loads. |
| Site Display Same form | “Site Wide” for analytics, “Specific Pages” for a conversion pixel | A script that loads only where it is needed weighs less on other pages and collects less data. |
| Location Same form | “Header” if the service requires it, otherwise “Footer” | Verification tags and tag managers want the head; a chat widget loads fine at the bottom of the page. |
| Device Display Same form | “Show on All Devices” unless you really need otherwise | Filtering happens on the server based on the browser; with a page cache that does not separate mobile and desktop, the cached version can be served to everyone. |
| Status Same form | “Inactive” while you prepare it, then “Active” | You save the code without outputting it, then switch it on once the targeted pages are checked. |
| Export Snippets HFCM > Tools | Export all snippets before uninstalling or a major change | Uninstalling drops the snippet table: the export file is your only copy outside backups. |
| Enforce DISALLOW_UNFILTERED_HTML HFCM > Settings (shown only when the constant is defined) | On, for a site whose snippets no longer change | Nobody can save or update a snippet anymore; uncheck it for the time of an edit. |
- View the source of a targeted page: the
HFCM by 99 Robots - Snippet #comment should sit right before your code, and should not appear on an excluded page. - Clear the page cache after every addition or edit, then confirm in the service’s own tool (Google Analytics, Meta Events Manager) that the tag reports in.
- Delete snippets for services you no longer use: an old third-party script keeps collecting data.
Header Footer Code Manager’s patched vulnerabilities
Anyone who can save a snippet can inject Javascript across the whole site, so HFCM restricts its screens to administrators (the manage_options capability). Every published vulnerability affects the admin area, and all were fixed years ago:
- CVE-2021-24791, fixed in 1.1.14: SQL injection through the sorting parameters of the snippet list, exploitable with an administrator account.
- CVE-2022-0710, fixed in 1.1.17: reflected XSS through the
pageparameter, triggered when a logged-in administrator opens a crafted link (CVSS 6.1). - CVE-2022-0899, fixed in 1.1.24: another reflected XSS, caused by unescaped URLs on an admin page.
- CVE-2023-39989, fixed in 1.1.35: a CSRF flaw that let an attacker activate, deactivate or delete snippets by getting an administrator to click a link (CVSS 5.4).
The real risk is a stolen administrator account: keep the number of admins low (see our article on WordPress roles and capabilities) and keep the plugin updated, with automatic plugin updates if that suits your site. If your wp-config.php defines DISALLOW_UNFILTERED_HTML, version 1.1.45 lets you apply that ban to snippets too. The “HFCM by 99 Robots” comments flag the plugin on every page (see HTML comments and the generator tag); WP Feint Pro strips them from the public code, which makes the plugin harder for bots to spot without replacing updates.
What WP Feint hides for Header Footer Code Manager
Pro Handled by WP Feint Pro only
The free version does not know the traces specific to Header Footer Code Manager: without Pro, only generator tags are removed, as for any plugin.
Free version
Handled by WP Feint Pro only
With Pro
- signed HTML comments
Still visible
No known trace
Header Footer Code Manager FAQ
Why does my script show up as text on the site?
The code was pasted without its <script> and </script> tags: add them in the snippet and save.
Can Header Footer Code Manager run PHP?
Not in the free version, which is limited to HTML, CSS and Javascript. PHP snippets, with validation designed to prevent site crashes, are part of HFCM Pro.
How much does HFCM Pro cost?
The official page lists $35 per year for one site, $69 for five sites and $139 for unlimited sites. Updates and support are included while the subscription is active.
What happens to my snippets if I delete the plugin?
They are erased: uninstalling drops the table that holds them. Export them first from HFCM > Tools and keep the file.
Should I network-activate it on a multisite?
No: the developer asks you to activate it on each subsite only, never across the whole network.