The joy of working with @IFTTT , @WordPressdotcom , and @Blogger

Bear with me for a while; I want to document something.

For a lot of reasons (mainly to see if I could do it), I decided a couple of weeks back that I would like to simulcast this blog (which runs on WordPress.com) onto the Blogger platform. My plan was to write and publish the blog posts on WordPress (whose editor I like better – the old one, not the new one) and use IFTTT to take the post from WordPress and create a post on my Blogger blog. So, I set up the blog on Blogger and created a recipe in IFTTT that waited for a new post on WordPress and publish it on Blogger as well.

And it worked!

To a point…

Some of the posts weren’t showing up in Blogger when I did this. I would get the post title and nothing else. I experimented and found that, whenever I attached a caption to a picture in WordPress (which I do frequently), I was getting the blank posts. I looked at the code WordPress was generating, and it looked like this:


<figure id=”attachment_1877″ style=”width: 375px;” class=”wp-caption aligncenter”><a href=”http://ift.tt/14zqt9v”><img src=”http://ift.tt/1B5uC3K&quot; alt=”Click to visit the challenge!” class=”size-full wp-image-1877″ /><figcaption class=”wp-caption-text”>Click to visit the challenge!</figcaption></figure>

Perfectly-formatted HTML5 code. Works on both WordPress and Blogger, provided it’s coded in the text editor of each. Unfortunately, when IFTTT processes the code, it inserts a line before all of that that looks like this:


<div xmlns=’http://www.w3.org/1999/xhtml’&gt;

That tells Blogger that what follows is XHTML. That <figure> tag, added as part of HTML5, is not allowed in XHTML. As a result, and I don’t know where it’s happening, the minute that tag is encountered, something is telling IFTTT “NOPE!” and everything except for the XHTML line is deleted from the post.

Now, just as an experiment, I set up a recipe that would look to Blogger and create a post in WordPress, and it worked fine. The HTML5 passes over with no problem, and everything is, as my Canadian friends say, tickety-boo. No tag that tells WordPress “Here comes XHTML!” is generated when going from Blogger to WordPress. But the exercise involves taking what’s in WordPress and sending it to Blogger, not the other way around.

So, until IFTTT figures out why they’re telling Blogger that XHTML is coming and stops doing it, I’m using an XHTML method to center graphics and put captions on them.

This is frustrating!!

The above image required the following code:


<div style=”width: 240px; margin-left: auto; margin-right: auto; display: block; text-align: center; font-size: 75%”><img src=”…” width=”240″ /> This is frustrating!!</div>

I have this all sitting in Evernote so I can copy and paste it whenever I need it, but man, it’s a pain in the backside to center a picture in a post and put a caption underneath in both WordPress and Blogger. I could just decide to get WordPress right and have Blogger show up however it shows up, but that’s not how I roll. I want to get it right on both platforms, and would like to get it right without having to go through all this.

I have alternatives, of course. One would be to use another service, but so far IFTTT is the only one that can work with WordPress and Blogger. I could go from Blogger to WordPress, but the Blogger editor doesn’t give me the ability to put a caption on a picture, among other things (e.g ordered and unordered lists). To get those things, I’d have to do the markup manually (i.e. what I’m doing now). I could code the posts offline using Markdown, post manually to both WordPress and Blogger, and take IFTTT out of the loop entirely, at least until they fix the problem. Or I could shut down the Blogger blog and forget the whole thing.

IFTTT is aware of the problem, and is “looking into it.” I guess I’ll find out when I find out. Meanwhile, if things look a little weird, we’re working on it.

Advertisements

Author: John Holton

I'm a writer and blogger who writes and blogs about things that interest me.

5 thoughts on “The joy of working with @IFTTT , @WordPressdotcom , and @Blogger”

    1. It would seem that they’re a lot less compatible than I once thought. I might end up writing my posts in generic HTML5 and posting them twice, once to each. It’s a pain, and the way WordPress has it I can’t just set up a style sheet and put it in, unless of course I want to fork over some dough. The only other thing I can think of is taking the WordPress style sheets and putting them in Blogger (WordPress charges to let you do that) and hoping that makes a difference. The idea was, as you figured out, automating the process: post to WordPress and have the post also in Blogger. Not sure how that’s going to work now…

      Like

      1. Maybe you could choose a simpler WordPress theme and try again? I know they’re not too compatible unless youre going the other way. Blogger > WordPress. Have you tried it that way?

        Like

        1. The problem really has nothing to do with the theme; it’s with the format of the posts. They should work the same and look the same (within reason) on either platform.

          I have tried going from Blogger to WordPress, and it worked all right. The reason I’m going WP to B is (1) I’m used to the way WordPress works, and (2) WordPress doesn’t allow me to update the stylesheet. I’m thinking that I can add the WP stylesheets to Blogger (which does allow me to add to the stylesheet) so that, when the post comes from WP, Blogger has all the classes it needs to make the post look right.

          Something to play with, anyway… 🙂

          Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s