On my site using Elementor + HFCM Pro, I have my google tag manager container added, one snippet for the “header”, and one snippet for the “body open”. On regular pages, both snippets load fine. But on the archive pages, and any page with a post feed that contains an excerpt, the “body open” tag is loading with every single feed item. So on an archive page with 20 posts, it’s loading the body open code 21 times (once for the actual archive page, and once for each post, just before tits excerpt).
]]>We have many pages on the site where we want to add rich results snippets, however, we don’t want to add them manually one by one as it is a lot of work. For example, we want to add Article schema on the pages. We are currently adding the Article schema as a JS Snippet Type. Is there a way to automatically add different Article schema on each page using the plugin?
]]>When saving PHP snippets in Pro version, we get the following error recently:
strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated
WordPress version: 6.6.2
HFCM Pro version: 1.0.19
PHP version: 8.3
It seems like the latest version is passing a null string as the title which causes an error to appear on the admin page
Error is like this:
Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in?/www/tripplocom_635/public/wp-admin/admin-header.php?on line?36
Which then comes from the title being empty
https://github.com/WordPress/WordPress/blob/master/wp-admin/admin-header.php
// This submenu is HIDDEN, however, we need to add it anyways
add_submenu_page(
'',
( 'Update Script', 'header-footer-code-manager' ), ( 'Update', 'header-footer-code-manager' ),
'manage_options',
'hfcm-update',
array( 'NNR_HFCM', 'hfcm_update' )
);
And after inspecting the plugin on row 265 one can see that the page for editing the snippets have a empty title.
]]>Hi, I have a simple snippet like:
<div id="gvk_04" style="text-align: center;"></div>
<p align="center"><button class="spw_button" onclick=spw_gvk_expl()>Show/Hide explanation</button></p>
<script>
function spw_gvk_expl() {
var x = document.getElementById("gvk_04");
if (x.innerHTML === "") {
x.innerHTML = spw_gvk_expl_brd(4);
} else {
x.innerHTML = "";
}
}
function spw_gvk_expl_brd(brd) {
returnHi, this is the explanation of board ${brd}
}
</script>
It is toggling between showing/hiding some explanation.
Is it possible to pass the boardnumber (4 in the code above) as a parameter, so I can use the same code for all boards? Something like
[hfcm id=”123″ brd = “4”]
Kind regards,
Saskia
]]>Hello,
I really love your free plugin. Can I suggest a couple of things that could improve it?
Thanks a lot, your plugin is great!
]]>Is there a way to export all the snippets we have in HFCM plugin? (We use them to inject schema and want to back up all the schema). Thanks in advance.
]]>I have 3 HFCM snippets configured, one of each type (HTML, Javascript and CSS). The HTML and Javascript snippets are inserting correctly into the page. However, the CSS snippet is not inserting. HFCM is inserting the pre- and post- comments into the page, but not inserting the actual CSS.
Thank you for your help!
]]>Good afternoon. What needs to be changed in the code so that all snippets are on the same line?
]]>Hello,
I don’t know when it started to happen: when I coded this website, it was fine. So is it a HFCM update or a wordpress update or both, or did I inadvertedly change something?
Problem:
Snippet type: HTML
Site display: shortcode only
Then I add it in a block template using a Shortcode block: [hfcm id=”3″]
Now, there appears extra <p> and <br> tags causing white space.
The html generated is:
<p><!-- HFCM by 99 Robots - Snippet # 3: Google Tag Manager (body) --><br />
<!-- Google Tag Manager (noscript) --><br />
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WLTGPHL"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><br />
<!-- End Google Tag Manager (noscript) --></p>
<p><!-- /end HFCM by 99 Robots --></p>
]]>
Hi,
Using this plugin with Redis, Activating the plugin shows NOT Activated (while it is?) and i have to Flush the cache of Redis to see what happened.
Thanks
]]>Hello and thank you for this very useful plugin!
I use the “Head, Footer and Post Injections” plugin but needed to insert scripts into specific categories and pages, so I installed your plugin which allows this.
I thought I could delete the other plugin, but yours doesn’t allow to add code before or after the body, so I have to keep it.
So I’m wondering why your plugin doesn’t do this and is limited to the header and footer?
]]>Hi guys,
I have recently tried to add the Google Tag Manager using your plug-in.
After some testing, I noticed that the GTM is heavily impacting the mobile loading time. That said, I deleted the plug-in along with the script.
However, ?theGTM code is still embedded somewhere in the website and I am unable to track it either on header or footer of the theme.
Any help in this regard?
Thank you
I do see options for adding HTML, CSS and JS snippets but nothing for adding PHP.
How can I test if this plugin can perform the required task before purchasing a Pro licence?
First: Well done! Great!
My question: I have snippets in the header that should always be executed and a snippet that should only be executed on some pages. But this snippet must always be executed after the other snippets.
I suppose the snippets are inserted in numerical order. But this order isn’t editable afterwards. Is such a feature planned for the future, or am I completely wrong with my assumption?
Hi,
I can create snippets but SAVE option not working, when I hover on it, it looks zero activity. I have deactivated and re do all, but result still same. Same result for update or delete snippet after editing any snippets. Please guide. Thanks
Hello,
I need to add my google analytics 4 pixel code to the body of every single page of my website.
If I choose side wide, the only two options are header and footer. Why doesnt your plugin give me the option to insert the code to the body for side wide option?
It makes no logical sense.
I dont want to select specific pages because I have 30 plus pages and every time I add a new page I need to remember to add it to your plugin. It is a pain.
Can you please update it so side wide also has body option?
In the meantime, for side wide which option do I choose if Google tells me specifically to add the code to the body section on my site?
]]>The code i want to add is
<script>
fbq(‘track’, ‘StartTrial’);
</script>
and selected html, and then on specific page and selected page but it adds it inside the body that supposed to be added in header before </head> close tag
When using the PHP code functionality of HFCM, I get the following error for one of the hosters we are using:
realpath(): open_basedir restriction in effect. File(/usr/bin) is not within the allowed path(s): (/var/www/x03_59:/usr/share/php)
Is there any way to solve this? Looks like HFCM is trying to use an absolute path to PHP here.
EDIT: Nevermind, it’s suddenly working now.
]]>A friend was working on one of the snippets and he reloaded the page, when he did so he got error messages like you would get if the snippet didn’t exist. (undefined variables for name, snippet, device_type, location) the same as you’d get if you set id to 200000 in the URL.
I looked in the DB and it was gone. Totally disappeared. Any idea what could have caused it?
]]>Hello,
Having trouble with getting scripts to show up on all pages they are assigned to. The link mentioned here should be showing /roi-calc/assets/js/app.min.js and it’s working on 2 other pages.
View post on imgur.com
]]>
Upgrading to 1.1.33 throws a fatal error:
PHP Fatal error: Uncaught Error: Call to undefined function is_product_category() in /home/nginx/domains/domain.com/public/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php:501
Stack trace:
#0 /home/nginx/domains/domain.com/public/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php(609): NNR_HFCM::hfcm_add_snippets()
#1 /home/nginx/domains/domain.com/public/wp-includes/class-wp-hook.php(308): NNR_HFCM::hfcm_header_scripts()
#2 /home/nginx/domains/domain.com/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#3 /home/nginx/domains/domain.com/public/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/nginx/domains/domain.com/public/wp-includes/general-template.php(3049): do_action()
#5 /home/nginx/domains/domain.com/public/wp-content/themes/acabado/header.php(69): wp_head()
#6 /home/nginx/domains/domain.com/public/wp- in /home/nginx/domains/domain.com/public/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php on line 501
Downgrading back to 1.1.32 brings it back online
]]>I updated the plugin on June 26th and it looks like something broke. Below is what I’m seeing when certain snippets are activated. It’s only some snippets that are causing it.
Fatal error: Uncaught Error: Call to undefined function is_product_tag() in /home/customer/www/anindigoday.com/public_html/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php:574 Stack trace: #0 /home/customer/www/anindigoday.com/public_html/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php(609): NNR_HFCM::hfcm_add_snippets(‘header’) #1 /home/customer/www/anindigoday.com/public_html/wp-includes/class-wp-hook.php(308): NNR_HFCM::hfcm_header_scripts(”) #2 /home/customer/www/anindigoday.com/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #3 /home/customer/www/anindigoday.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/customer/www/anindigoday.com/public_html/wp-includes/general-template.php(3049): do_action(‘wp_head’) #5 /home/customer/www/anindigoday.com/public_html/wp-content/themes/genesis/header.php(35): wp_head() #6 /home/customer/www/anindigoday.com/public_html/wp-includes/template. in?/home/customer/www/anindigoday.com/public_html/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php?on line?574
]]>I created a snippet which didnt work and deleted it. Now the code is permanently displayed in the header of my side. I can’t find where hfcm placed it to delete it manually. I am a brutal beginner in coding. Can someone help?
I use Theme Vogue
]]>Hi,
After switching to PHP 8.1 we get some php notices (PHP Deprecated), coming from your plugin. We disabled all plugins one by one and yours seems to be the cause.
Thanks
]]>Hello,
For the Tidio Chat plugin I want to add this code to my website: https://share.cleanshot.com/0BRmbwvq
When I add it like this (https://share.cleanshot.com/bJYjnTJq), some functionalities of my website are not working anymore.
What can I do in order to add the Tidio function code correctly to my website using HFCM?
Steff
]]>Hello,
we have been using hfcm for a while now. Recently i had Problems with Script order and when i checked the Scripts loaded by hfcm, i saw that the scripts where modified with defer and async attributes (see image below).
I never put them into Code and when i check the scripts in the Plugin, most of the times i don’t even see them. Sometimes they are in the code, but even when i remove them and save, they are back again after some time?
Update: WPRocket’s js caching was the culprit.
]]>Is their a setting to add a shortcode / script to all tag posts ?
]]>hello so on wordpress 6.2.2 on php 8.1 it says Deprecated the next codes
07-Jun-2023 06:40:57 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/vhosts/domain.gr/httpdocs/wp-includes/functions.php on line 7053
[07-Jun-2023 06:40:57 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/domain.gr/httpdocs/wp-includes/functions.php on line 2165
i did debug_print_backtrace
/httpdocs/wp-includes/plugin.php(768): wp_normalize_path(NULL) #1 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/plugin.php(1405): plugin_basename(NULL) #2 /var/www/vhosts/domain.gr/httpdocs/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php(272): add_submenu_page(NULL, ‘…’, ‘…’, ‘…’, ‘…’, Array) #3 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(308): NNR_HFCM::hfcm_modifymenu(”) #4 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/menu.php(155): do_action(‘…’, ”) #7 /var/www/vhosts/domain.gr/httpdocs/wp-admin/menu.php(420): require_once(‘…’) #8 /var/www/vhosts/domain.gr/httpdocs/wp-admin/admin.php(158): require(‘…’) #9 /var/www/vhosts/domain.gr/httpdocs/wp-admin/index.php(10): require_once(‘…’) #0 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(768): wp_normalize_path(NULL) #1 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/plugin.php(1405): plugin_basename(NULL) #2 /var/www/vhosts/domain.gr/httpdocs/wp-content/plugins/header-footer-code-manager/99robots-header-footer-code-manager.php(282): add_submenu_page(NULL, ‘…’, ‘…’, ‘…’, ‘…’, Array) #3 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(308): NNR_HFCM::hfcm_modifymenu(”) #4 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/menu.php(155): do_action(‘…’, ”) #7 /var/www/vhosts/domain.gr/httpdocs/wp-admin/menu.php(420): require_once(‘…’) #8 /var/www/vhosts/domain.gr/httpdocs/wp-admin/admin.php(158): require(‘…’) #9 /var/www/vhosts/domain.gr/httpdocs/wp-admin/index.php(10): require_once(‘…’) #0 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(768): wp_normalize_path(NULL) #1 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/plugin.php(1405): plugin_basename(NULL) #2 /var/www/vhosts/domain.gr/httpdocs/wp-content/plugins/wp-google-places-review-slider/admin/class-wp-google-reviews-admin.php(273): add_submenu_page(NULL, ‘…’, ‘…’, ‘…’, ‘…’, Array) #3 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(308): WP_Google_Reviews_Admin->add_menu_pages(”) #4 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/menu.php(155): do_action(‘…’, ”) #7 /var/www/vhosts/domain.gr/httpdocs/wp-admin/menu.php(420): require_once(‘…’) #8 /var/www/vhosts/domain.gr/httpdocs/wp-admin/admin.php(158): require(‘…’) #9 /var/www/vhosts/domain.gr/httpdocs/wp-admin/index.php(10): require_once(‘…’) #0 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(768): wp_normalize_path(NULL) #1 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/plugin.php(1405): plugin_basename(NULL) #2 /var/www/vhosts/domain.gr/httpdocs/wp-content/plugins/wp-google-places-review-slider/admin/class-wp-google-reviews-admin.php(279): add_submenu_page(NULL, ‘…’, ‘…’, ‘…’, ‘…’, Array) #3 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(308): WP_Google_Reviews_Admin->add_menu_pages(”) #4 /var/www/vhosts/domain.gr/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/domain.gr/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/vhosts/domain.gr/httpdocs/wp-admin/includes/menu.php(155): do_action(‘…’, ”) #7 /var/www/vhosts/domain.gr/httpdocs/wp-admin/menu.php(420): require_once(‘…’) #8 /var/www/vhosts/domain.gr/httpdocs/wp-admin/admin.php(158): require(‘…’) #9 /var/www/vhosts/domain.gr/httpdocs/wp-admin/index.php(10): require_once(‘…’)
https://www.ads-software.com/support/topic/deprecated-strpos-4/#post-16799788
]]>Hello Team,
I am facing issue in HTML Type snippet in the HFCM because it doesn’t fetch the excluded Post list the ajax loader is loading for infinite times.
Please Refer Below Screenshot for the same
]]>