Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

johngorenfeld on "Stop Twitter from widgetizing my Oembeds"

$
0
0

So when I embed a tweet URL, the following seems to happen, if I am not mistaken:

1) The URL is replaced by the tweet, as a blockquote, in unstyled text. I want this because it fits nicely into my design.

2) A moment later, Javascript replaces the blockquote with a full-blown widget: the familiar white tweet object, with a fave button, an image, a new font, new style rules, etc.

I am interested in getting #1 but suppressing #2. I think this may have something to do with sending the "omit_script" parameter to the Twitter oembed endpoint, but I can't seem to get it to work. I have been trying to use add_query_arg to add this to the query, with no luck.

I checked the debugger and it seemed as if this transformation was being carried out by Twitter's widget.js. There is a particular load() function that seems to be doing the deed.

I was wondering if anyone might be able to help me prevent Widget.js from going off when a tweet is embedded, or to suggest another way to keep my tweet embeds plain.

Any help much appreciated.


Viewing all articles
Browse latest Browse all 8245

Trending Articles