Trying to use the Wordpress Step

I think I am completely misunderstanding something about the Wordpress Drafts Action.

I’m using a self hosted blog with the latest Wordpress, which right now is 5.3.2 with no plugins. Or rather the only plugin seems to be something to do with Google Fonts, ask my husband, :slight_smile: and that doesn’t seem like it would change anything.

What I’m trying to do is write my blog posts in Markdown in Drafts, and then use the Wordpress action to post it. As a test, I’m using the wordpress posting action, the one that uses the Wordpress step, not the script and I pretty much haven’t changed it.

The first test was fine. A title and some text. The problem is that this doesn’t let me format anything. So I try Markdown. Obviously this doesn’t work, Wordpress doesn’t understand Markdown out of the box. So I convert it to html with the %% tags, and try that.

This completely doesn’t work. I’m not even sure exactly what Wordpress is doing to it, but most of it gets deleted when I view the post on my site, which is odd.

If I paste the generated html into Wordpress itself, it’s fine, but not if I send it.

I can use the Post to Wordpress action in Shortcuts to do it: Convert the markdown to richtext then run the action, but I can’t figure out what I need to do in Drafts to use the native support. Can anyone tell me what my tired brain is missing?

1 Like

I know there’s a lot of variance in WordPress installations and what they expect/want in post content.

I admit I do not personally use WordPress and do not have a lot of insight into these variations - hopefully some other WordPress users might chime in with some ideas.

Most of the testing for the WordPress action step has been done against a stock blog on wordpress.com, as it seemed likely that is the baseline and most common use case. For wordpress.com, it does not render Markdown out of the box - but using the %%[[body]]%% template in the action results in valid HTML in the post, which renders both in the web visual editor and raw HTML view properly of the admin site after the post has been created.

I’d love to get documented what the best ways to configure WordPress are to make sure it supports the HTML output of the Markdown engine - and/or to allow it support storing posts as raw Markdown, which I know is an option, but I assume requires plugins.

1 Like

Thanks for the reply. To be honest, unless someone replies with a “duh, change this configuration variable” post or something, my post to blog action is currently a Shortcut called from Drafts. I’m coming up with enough excuses not to start this blog as it is, so I think I’ll stop trying to figure it out for a bit, :slight_smile: I’ll update this with an answer if I figure it out later.

Hi,

Getting similar issue here, publishing from Drafts with %%[[body]]%% got escaped and tags are part of the blog post text instead of html. Maybe something changed ?

Is your site self-hosted? Wordpress.com? Was it working and stopped, or has this escaping always happened for you?

It is self hosted With few plugins and havent tried before. I have tried couple ways and try to install jetpack or markdown plugins, and the article is always created with tags escaped.

UPDATE (because I cant reply as a new user …) Thanks @wjk that actually works on ios and problem is MacOS only.

I have the same problem as @sbusso. When I use the “Post to wordpress with markdown” action on macOS, Tags are shown in visual mode as below.

Screenshot of Safari (2020-02-12 4-07-56 PM)

The weird thing is that when I use the same action on IOS, there is no problem.

I was just playing with this…seems like some changes in Wordpress. For my testing blog (on Wordpress.com), if I upload as HTML (using %%[[draft]]%%) as draft status, and open the draft in the Wordpress web editor, I see the HTML tags in the visual editor. If I click to switch to the raw HTML editor and back, those tags get re-processed into rich-text visual formatting…which is kind of bonkers.

This will take some more digging. Seems like bug/change at the Wordpress end that may be hard to workaround.

1 Like

Exactly what I saw. Glad to know I haven’t totally lost it, :slight_smile:.

The interesting question is, why can I do this without a problem through the shortcuts action? What the heck is it doing?