Support Forum

Problem with tweets in posts??

FM Frank Mastroianni
Frank Mastroianni
Member

Can you please help me correct the issue seen here:

http://forum.canadiangolfmagazine.com/forum-index/tour-issue-prototype-exotic-high-end/godaddy-founder-making-irons-parsons-extreme

When embedding tweets in the unified SP theme, the tweet portion at the bottom gets cut off.

Thank you

7 Answers

New Answer

IK Ike
Ike
Member

The problem seems to be coming from the iFrames inherited CSS.

#spMainContainer .spPostContent iframe {
    max-width: 100%;
    width: 640px;
    height: 360px;

The height:360px is whats cutting things off. The theme itself doesn’t set a height for the iFrame, only the ‘max-width’ which you see at the top there, so this is coming from somewhere else.

How did you embed the tweet, was it the normal iFrame embed code? if so it normally allows you to set a height such as

<iframe width=”xxx” height=”xxx” src=

FM Frank Mastroianni
Frank Mastroianni
Member

No, I didn’t actually embed the code in an iframe. Generally, from what I’ve done in the past outside of simple press in most WordPress themes, all you need to do is copy and paste the link to a Tweet and it should embed properly.

This is also what most users would be doing and the way I’d want it to function for them. Is there any way to fix this so that users can simply post the url for the Tweet as it generally works in WordPress and most other platforms?

MP Mr Papa
Mr Papa
Member

not sure since wp doesnt do anything with tweet urls… we make no conversion whatsoever…  Except we the wp content filters still run to do whatever would normally happen with post content…

its wp that is generating the iframe and something on the site (theme or plugin) is adding the inline page css style for the iframe…  we do not add an iframe height like that as Ike says…

what on your site is doing that?  not sure… since its in page styled, seems like some js…

but we cannot give you any css to help since those added styles will take control…

guess I would try a temp switch to the default wp theme and see if still going on…  if so, try disabling other plugins and see if any better…  cant tell much but you have some jarida plugin that is potentially affecting images/iframes…

FM Frank Mastroianni
Frank Mastroianni
Member

Where do I look to find the values listed in Ike’s post above and what would happen if I changed the height value?

YS Yellow Swordfish
Yellow Swordfish
Member

Somewhere you have CSS rules being added to your page loads – i.e., inline embedded into the page. One of the rules being added this way is the one effecting the iFrame size – 

#spMainContainer .spPostContent iframe

because it is being loaded inline like this it will override just about everything. What I can’t tell you, of course, is what is loading it but I can tell you it isn’t Simple:Press. However – it does target several Simple:Press elements and rules so whoever wrote it knew something of what they were doing,

Has this been added by someone to the spFunctions.php file of your SP theme? Or the functions.php file of your WordPress theme perhaps?

FM Frank Mastroianni
Frank Mastroianni
Member

Swordfish,

I actually found where the values were being inherited from and removed the height value and all works well now.

Thank you

IK Ike
Ike
Member

Glad you got it fixed, would be interested to know where the problem was in the end?