Wordpress keeps changing my code!?

unclened

Suspended / Banned
Messages
4,009
Edit My Images
No
Hi,

I'm fairly new to wordpress, but slowly getting the hang of it. I'm using Soundslides to create musical slideshows on my website. Soundslides has a cool responsive feature that will adjust the size of the slideshow to fit the device but I can't get the code to work because everytime I flick out of text editor, wordpress deletes some of the code and changes the remainder to text that I haven't even entered!!

The instructions sound slides is giving me is:

Responsive scaling embed code (ADVANCED)
Step 1. Add the following CSS to your html page.

<style type="text/css"><!--.embed-container { position: relative; overflow: hidden; /* To maintain a 4/3 aspect ratio use 75% for the padding-bottom value below To maintain a 16/9 aspect ratio change to 56.25% */ padding-bottom: 75%;}.embed-container iframe,.embed-container object,.embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%;}--></style>

This should be added before the '</head>' tag or to an existing style sheet.

Step 2. Copy/Paste the following text into your document.

<div class="embed-container"><iframe scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen src="http://'my domain'/Slideshows/portfolio/_files/iframe.html"></iframe></div>

When I flick out of text, it deletes the first portion and changes the second bit to...

</p><div class="embed-container"><iframe src="http://'my domain'/Slideshows/portfolio/_files/iframe.html" width="300" height="150" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div>


The slideshow still appears on the page but it's tiny unless I make it full screen, which isn't the way it's meant to be.

Any ideas? :ty:
 
How new( what version) is your installation of Wordpress?
 
Have you tried changing allowfullscreen="allowfullscreen" to allowfullscreen="no"

I havent tried, but I want to retain the fullscreen option.
 
How about Soundslides?
There may be a compatibility issue.
I thought they had stopped updating Soundsklides in 2012?
 
I've also sent them a query. They are still developing and supporting it. I think the issue is at wordpress, I have a feeling it fiddles with the code by default.
 
A friend had a similar issue last year.
I don't know what the outcome was though. I remember him talking about the version history...
 
Where did you place the css? Normally a well designed theme has got a section for custom css code and I would ensure you use that to ensure it gets loaded in the right order and doesn't get overridden by the theme.

html5 doesn't support attributes like frameborder and scrolling any longer so they would be just for backward compatibility. allowfullscreen= is the only correct way, not sure why the developer put the other attributes in. However again it is not html5 standards compliant.

Personally I would move on and get another slideshow, the WordPress jetpack come with some great ones straight out of the box and all responsive. This one is not standards compliant, requires manual hacks and utilized iframes despite the content originating from your server; why? Just why?
 
The newer versions of wordpress try to deal with media insertion automatically, so you just post in the link and it sorts it out. That's probably whats going on.
Could you put your code in an iframe?
 
Back
Top