Hi,
I’ve got some ads I want to display using HTML code from the ad provider. The ads always finish with a section of code that has ampersands in them, like this: id=3790&cid=9537&ctgid=1001
I can put the code into a post (under the Text tab, not the Visual tab) and all appears well, but as soon as I save the post or switch from Text back to Visual that section of code becomes: id=3790&cid=9537&ctgid=1001
In other words, something in the theme is turning the character & into &. This causes the ads to break because the code is not recognized.
Can someone help me understand how to get this to stop?
Thank you,
Ned
Hello bustedflushltd,
Unfortunately, I do not know what type of ad code you are using, but please notice that our theme has been designed to use only the Google Adsense code and also, if you want to create your banner ad you will have to use the DIV’s method according to our documentation here -> https://forum.tagdiv.com/using-other-ads-non-adsense-ads/ For more information about our ads, please check here -> https://forum.tagdiv.com/header-ads-adsense/
Thanks for your understanding!
Hi Catalin,
The information you provided was useful I think, and I’ll investigate this. Most of our non-Google ads are working fine, but I’ll look into this issue another time.
My main problem is the theme adding unwanted characters to code. Whether or not this is for an ad or anything else isn’t really relevant. How do I get the & symbol to remain a & and not get converted into &?
I’m sorry if this is a problem across all WordPress themes – I’ve not come across it before but I’m not hugely experienced.
Ned
Hi
The theme won’t change the way html is encoded and does not add any additional characters. You can try this with a default wp-theme and check if the code works when is pasted in the page. Make sure that you paste the code in text mode, save the page then view it in the browser and check how it goes.
Thanks!
Hi,
Thanks for your reply Andrei, but I’m afraid you’ve missed the entire premise of my original post.
I am inserting the HTML code into the text mode, and yes it is including additional characters spontaneously.
To be specific, when I insert “&” inside the html code and either save the post or switch from text mode to viewer mode and back to text mode, it has become “&”
Can someone please help?
Ned
Hi,
I’m not sure exactly how you are using & inside html or how it gets converted as you mention the same symbol: http://screencast.com/t/b4Ub9iTyZkm2
Our theme does not have any influence over the html so please test any custom code on a wp default theme to see if the theme or something else affects the html code.
Thank you!
Hi Bogdan,
I found someone who knows lot about WordPress and I’ve figured out the “&” issue (in the Text display it converts & to the unicode for & which is & – this caused problems for WordPress users for years, but now appears to be patched because when looking at the sourcecode the tracking URLs were coming up with just the & character even if in the Text display they showed &).
Unfortunately, because this was not a real problem, it’s not the reason our ads are not displaying.
This is what I think the real issue is:
For our banner ads with tracking URLs in them, the URLs that should appear in the sortcode begin http://. This is how they appear in the Text display. However, when you look at the sourcecode the link the ads are pointing to is https://. The providers of these two ads are not compatible with https:// (at least not yet). This is causing the links that provide the content for the banners to fail.
Interestingly, the text only links to the same companies do not change from http:// to https://. They stay http:// in the sourcecode. So this is only an issue with banner ads.
I have no idea if this is something caused by the Newspaper theme, or a general WordPress problem. Our site is built with https:// but I can’t see how this would cause the sourcecode of some but not all outgoing links to be changed. Can you tell me if this is something in the theme causing the S to pop in there, and if so how I can turn that function off?
Thank you,
Ned
Hi,
Sorry it’s taken me a while to get back to this, but I’ve done a test on a basic wordpress theme and there is no problem with links being switched from http:// to https:// in the sourcecode.
I’ve now got three images I’m trying to link to that this is a problem with – a problem with about 25% of our linked images.
I’m not a programmer, but we’re just using basic HTML. Here it is below with the actual URLs replaced by the letters URL and the alt text replaced with ALT TEXT
When this appears in the source code that I see by right clicking on Google Chrome the http:// that provides the link target is unchanged, but the http:// for the image source has changed to https://. In other words:
This is causing the image link to break.
As I said, I’m no programmer, but if this problem does not occur in a basic WordPress template, but does on yours then I can’t see how it can be anything but a problem with your theme. Can you tell me please how I can fix it?
Thank you,
Ned
Hi,
OK, please contact us via email at contact@tagdiv.com and provide precise information. A link to your site, the ad code you use, and login information so we can access your site and investigate.
Thank you!
Hiya,
We’ve managed to fix this by removing a plugin and I thought you’d like to know for future reference in case something similar is reported by someone else.
The culprit plugin was called ReallySimpleSSC.
Thanks for your help!
Ned