Code and images not showing above title on AMP
-
I have a bit of an odd problem that recently started happening. I cannot get any ads or manually placed content to display above the title within posts on my WordPress.com website — only on the AMP version.
The desktop version works perfectly. On AMP devices, the “above title” ads show at the very bottom of the webpage.
I’m using a paid theme on my desktop site. I’m using AMP Legacy for my AMP theme.
I’m using Advanced Ads to display manual ads and AdSense ads in post content on my site. All the insertions work correctly on the desktop and AMP, except above the title. Advanced Ads customer support logged on as an Admin and couldn’t figure it out.
I thought it was a problem with the plugin. I tried another plugin (Ad Inserter).
It had the same problem – it put the “above title” ads at the bottom of the webpage — only on AMP. The desktop worked correctly here too.I disabled the ads in my plugin so I could test further.
I went into my main theme’s functions.php file and created code. I wrote the code saying if the user is on a mobile device, echo the word “TEST” above the title. Same problem… It showed the word “TEST” all the way at the bottom of the page on AMP.
I thought maybe it’s a problem with my main theme. I disabled my theme and used the built-in WordPress 2021 theme. Same problem again.
I also tried switching off the AMP Legacy theme and using another factory theme. No change.
I disabled all of my plugins except for the factory plugins. I thought maybe there’s a conflict. That didn’t resolve the problem either.
The really weird part is it worked fine a few months ago. I tested it when I first started using it.
I could be wrong, but it seems like the problem is on the WordPress end, since its not either of the themes, it’s not the ad plugins, and its not a plugin conflict. Even inserting manual PHP code triggers the same problem.
Thoughts??
Thanks in advance!
The blog I need help with is: (visible only to logged in users)
-
Hello there,
It looks like the site is on the business plan, so we would recommend reaching out via https://wordpress.com/help/contact for some real time help with this.
It’s possible to remove AMP completely from working on the site as detailed here: https://www.wpbeginner.com/wp-tutorials/how-to-properly-disable-google-amp-in-wordpress/#:~:text=First%20thing%20you%20need%20to,AMP%20support%20on%20your%20website.
The first step would be to disable that to see if this resolves the issue. You could then look to enable this for certain templates if need be.
I hope this helps.
- The topic ‘Code and images not showing above title on AMP’ is closed to new replies.