HTML Issue
-
Either I’m doing something pretty stupid or wordpress is… please someone help?!
I’m trying to create a news page on my site and have the following HTML code from MotorCycle news that should produce a full page of news…
<script type="text/javascript" src="https://www.motorcyclenews.com/shared/js/widget.min.js"></script> <script type="text/javascript"> var MCN_widgetFeed = 'https://www.motorcyclenews.com/rss?N=343&Ntk=site&Ntt=MotoGP&Rpp=10'; var MCN_widgetOptions = { affiliateId: 88, width: 500, height: 1000, textSize: 'L', showDesc: 1, showImages: 1, openLinks: 1 }; document.write('<div id="MCN_widget"></div>'); MCN_widgetCreate(MCN_widgetFeed, MCN_widgetOptions); </script> <div id="MCN_widget_noscript"><a href="https://www.motorcyclenews.com/MCN/sport/">MCN Motorcycle sport</a></div>
However when copying this in to the ‘text’ editor on wordpress and pressing update changes get made to the code and it then looks like this…
<script type="text/javascript" src="https://www.motorcyclenews.com/shared/js/widget.min.js"></script><script type="text/javascript">// <![CDATA[ var MCN_widgetFeed = 'https://www.motorcyclenews.com/rss?N=343&Ntk=site&Ntt=MotoGP&Rpp=10'; var MCN_widgetOptions = { affiliateId: 88, width: 500, height: 1000, textSize: 'L', showDesc: 1, showImages: 1, openLinks: 1 }; document.write(' <div id="MCN_widget"></div> '); MCN_widgetCreate(MCN_widgetFeed, MCN_widgetOptions); // ]]></script> <div id="MCN_widget_noscript"><a href="https://www.motorcyclenews.com/MCN/sport/">MCN Motorcycle sport</a></div>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
And instead of a nice news article page it just creates a link to the news website…
Any ideas of why WordPress in its ultimate wisdom makes this unwanted change on my behalf, and how I can stop it doing it to get the news feed to come through properly…
I’ve unticked the setting in ‘writing’ that allows wordpress to make changes to invalid code, but alas still the problem…
- The topic ‘HTML Issue’ is closed to new replies.