Why Can't I See 'Top of Content' or 'Bottom of Content' in Header Footer Code Manager?
Content
If you're using the Header Footer Code Manager plugin and find that the 'Top of Content' and 'Bottom of Content' injection locations are missing, you're not alone. This is a common point of confusion that stems from how the plugin is designed to work with WordPress. This guide explains why this happens and what your options are.
The Problem: Limited Location Options
When creating a new snippet, you select a display rule, such as 'Sitewide' or 'Specific Pages'. Users often report that when 'Sitewide' is selected, only 'Header' and 'Footer' are available as injection locations. The 'Before Content' and 'After Content' options are not present. These additional options only appear when the display rule is set to a specific post type, like 'Specific Pages' or 'Specific Posts'.
Why This Happens
The 'Before Content' and 'After Content' locations are technically dependent on a specific WordPress hook: the_content(). This hook is present on standard post types like Posts and Pages. However, many other parts of a WordPress site—such as category archives, tag archives, author pages, and custom post type listings—do not use this hook. Therefore, to prevent code from being injected incorrectly or not at all on these pages, the Header Footer Code Manager plugin only makes these content locations available when you are targeting a specific post type that is guaranteed to use the the_content() hook.
Common Solutions and Workarounds
1. For Google Tag Manager (GTM) or Similar Scripts
A frequent use case is trying to insert the Google Tag Manager noscript tag right after the opening <body> tag sitewide. The official guidance from the Header Footer Code Manager team for this scenario is to place the second GTM noscript tag in the Footer location instead. This is a reliable method that works across all pages without requiring the 'Before Content' hook.
2. Using the Manual Shortcode Method
If you absolutely need to insert a snippet at a very specific point in your content, the plugin offers a 'Manual - Shortcode' insertion method. You can create a snippet and select this option, which will generate a unique shortcode. You can then place this shortcode directly into your post or page content, a custom HTML block, or a widget. This gives you precise control over where the code appears.
3. Check Your Display Rules
If your goal is to insert code before or after the content on a specific page or post, ensure your display rule is not set to 'Sitewide'. Instead, choose 'Specific Pages' or 'Specific Posts' and select the desired content. The 'Before Content' and 'After Content' options should then become available in the location dropdown.
Conclusion
The missing 'Top of Content' and 'Bottom of Content' options are not a bug but a design decision to ensure code reliability across different types of WordPress pages. For sitewide body tags, using the footer is a recommended and stable approach. For more granular control over content placement, using the shortcode method or targeting specific posts/pages are your best options.
Related Support Threads Support
-
Multiple Pixels Some not Reportinghttps://wordpress.org/support/topic/multiple-pixels-some-not-reporting/
-
Not Seeing Option for Top of Content or Bottom of Contenthttps://wordpress.org/support/topic/not-seeing-option-for-top-of-content-or-bottom-of-content/
-
Initial install shows message: You’ve been using the plugin for a while nowhttps://wordpress.org/support/topic/initial-install-shows-message-youve-been-using-the-plugin-for-a-while-now/
-
Exclude list not workhttps://wordpress.org/support/topic/exclude-list-not-work/
-
Injection settings missinghttps://wordpress.org/support/topic/injection-settings-missing/
-
Location only shows header/footerhttps://wordpress.org/support/topic/location-only-shows-headerfooter/
-
Align Text With Logo headerhttps://wordpress.org/support/topic/align-text-with-logo-header/
-
translate to Russianhttps://wordpress.org/support/topic/translate-to-russian-4/
-
Cannot Find Settings on WordPress Backend…?https://wordpress.org/support/topic/cannot-find-settings-on-wordpress-backend/
-
Please Fix Localization Issueshttps://wordpress.org/support/topic/please-fix-localization-issues/
-
Sitewide showing different placement optionshttps://wordpress.org/support/topic/sitewide-showing-different-placement-options/
-
Customizer Issuehttps://wordpress.org/support/topic/customizer-issue-4/
-
How do I uninstall plugin?https://wordpress.org/support/topic/how-do-i-uninstall-plugin/
-
Feature Request: Shorter Menu Titlehttps://wordpress.org/support/topic/feature-request-shorter-menu-title/
-
Feature Request: Move to Settingshttps://wordpress.org/support/topic/feature-request-move-to-settings/
-
Locations don’t allow top / bottom contenthttps://wordpress.org/support/topic/locations-dont-allow-top-bottom-content/