Back to Community

Why Can't I See 'Top of Content' or 'Bottom of Content' in Header Footer Code Manager?

16 threads Sep 16, 2025 PluginHeader 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