HTML code display on pages
-
Hi,
First of all, thank you for your great plugin.
I’ve an issue on my attached site. The HTML code display the beginning of the page.
The issue has started when I set up the Advertisement function with Google AdSense. The home page had has the same issue but disappeard when I set properly the Adsense Data IDs.
Other pages are working correctly except this.
The AdSense AMP script has inserted into code directly.
I’ve tested in the latest Firefox, Chrome versions on desktop and Firefox on mobile.Thank you for your help in advance.
The page I need help with: [log in to see the link]
-
Hi, Sorry for the inconvenience extremely. Can you please share with us the exported AMP optional panel settings once? So that we will import it at our end and check the issue once and get back to you accordingly to resolve it.
Here is the reference tutorial of it: https://ampforwp.com/tutorials/article/how-to-import-and-export-the-amp-option-panel-settings/Hi, Here you can check the exported AMP settings file: https://drive.google.com/file/d/1NyrqtqSss1OZrpaB42JN7EWHu3EntSES/view?usp=sharing
And the plugins what I use:
Accelerated Mobile Pages; Advanced CF7 DB; Advanced Popups; Contact Form 7; Cookie Information | Free WP GDPR Consent Plugin; CookieYes | GDPR Cookie Consent; Easy Forms for Mailchimp; Elementor; Email Address Obfuscation; Essential Addons for Elementor;
GDPR Compliance for Mailchimp; Google Analytics for WordPress by MonsterInsights; Imagify; Kadence Blocks – Gutenberg Blocks for Page Builder Features; Limit Modified Date; Meta-képpont WordPress-hez; Powerkit; ThemeREX Addons; ThemeREX Pop-Up; ThemeREX Updater; Wordfence Security; WP fail2ban; WP Mail SMTP; WP Rocket; WP Rocket | No .htaccess; WP to Buffer; WPS Hide Login;
Yoast SEO
All of them are the newest ones, exept Contact Form 7 and Cookie Information
Thank you.Thank you for sharing. Can you please check once if its due to any conflict? If possible, Please check once by deactivating the active plugins one by one on your site and let us know back if there is any conflict? So that we will analyze the issue and assist you to fix it accordingly.
Thank you for your solution suggestion.
I created a staging from the original site and I tested on to switch off the plugins one by one. It didn’t work. When Acelerated Mobil Pages lasted as only active plugin the problem had still existed. When I switched off AMP plugin, the issue disappeared.
Turned on all of the plugins except AMP. Finally I switch on AMP and everything seemed good but only once. The next reload brought out the problem again.Thank you for the information. Kindly please check once by clearing the cache and let us know back the response, So that we will assist you accordingly to resolve the issue.
I’ve cleared the cache manually than with WP Rocket and I cleared used CSS with WP Rocket just in case. Nothing changed with the issue.
Thank you for the information. Can you please let us know how did you set up the Advertisement function with Google AdSense? Please share the short video of how did you inserted the code, So that we will analyze the issue and assist you accordingly to fix the issue.
This was the tutorial what I followed: https://support.google.com/adsense/answer/9261309?hl=en
Than I created an ad unit in Google Adsense console. That created a “data-ad-client” code and “data-ad-slot” what I used in AMP settings to activate different ad locations in AMP settings.
I placed the script into Head section and the tag into Body section in code.
And could you say someting about the AMP settings testing what I shared to you? Have you been able to check?
Hi, Thanks for the information. To setup Auto Ads in AMPforWP kindly please refer to the following tutorial and setup the same and let us know back the response result, So that we will assist you if you need any help.
Here is the reference tutorial: https://ampforwp.com/tutorials/article/how-to-set-auto-ads-in-amp/
Hi,
Thank you for the link. I’ve tried and it haven’t worked.
But fortunately I found the bug.I created a new page for test maybe the page what I’ve set as archive page somehow have had broken.
But when I set this new page as archive in WordPress Settings/Reading menu, the new page also displayed code before the content on AMP version.
It seemed this issue connect somehow to the archive status that’s why searched for settings in AMP plugin what’s related for archive page.I’ve found in AMP the Settings/General/Archives [Category & Tags] item. I turned off and nothing changed. Then I switched off Custom Front Page item one up and the code-displaying also appeard on Homepage amp version.
When switched off disappeared again.So, it seems to me the bug is around the basic wordpress archive and homepage settings and the default AMP archive and homepage settings entaglementation.
Hi, Thank you for the information. As you said that you placed the script into the Head section and the tag into the Body section in the code but that’s not showing in the exported panel settings you shared before. Kindly please once again share the file, So that we will import it and check the issue and assist you to fix it accordingly as you shared the info.
Hi,
I’ve exported the updated settings.
You can reach the new file here:
https://drive.google.com/file/d/1uXV-uKb8iCqRHQJGGj3zmZq7gA6KZmWR/view?usp=sharingHi, Thank you sharing the file, We will check the issue by going through it and assist you to fix the issue shortly.
Hi,
Is there anything what you found?
Hi, Sorry for the dealy in response extremely. Can you please let us know, The AMPforWP plugin is activated at your end? So that we will check the issue immediately and assist you to fix the issue.
The topic ‘HTML code display on pages’ is closed to new replies.