Skip to main content

Publishing to WordPress with embed code

Paste your Publish embed code into a WordPress post or page, in the block editor or Classic Editor.

Written by Ashton Smith

You can add a Publish post to WordPress by pasting its embed code into a post or page. This works on all Publish plans, as long as your WordPress website allows JavaScript (the code that loads your post).

When should I publish via code?

Publishing via code is useful when:

  • The Narrative WordPress plugin can't connect to your website. See Install and connect the Narrative WordPress plugin.

  • You want to publish to more than one website.

  • Your website isn't live yet, or is a staging (test) website.

  • You want to add your post to a page instead of a blog post.

If none of these apply, the plugin is usually easier, as it fills in your WordPress post details for you.

How do I copy my post's embed code?

First, set up your publishing details if you haven't already.

  1. In Publish, finish your post.

  2. Click Publish and wait for it to finish uploading.

  3. Click Copy Link. This copies your post's embed code.

Next, log in to WordPress and open the post or page where you want your post. Then follow the steps for your editor below.

How do I add my post in the WordPress block editor?

If you use the WordPress block editor (also called Gutenberg), follow these steps.

  1. Add your post title.

  2. Click the + icon to add a block.

  3. Search for Custom HTML and click it to add it.

  4. Paste all of the code you copied from Publish.

  5. Click Preview to check your post.

  6. When you're happy with it, publish your post in WordPress.

Open the live page on your website to check your whole post shows.

How do I add my post in the WordPress Classic Editor?

If you use the WordPress Classic Editor, follow these steps.

  1. Click the Text tab. Don't paste the code into the Visual tab, or it won't work.

  2. Paste all of the code you copied from Publish.

  3. Click Preview to check your post.

When you're happy with it, publish your post in WordPress. Open the live page on your website to check your whole post shows.

What do I need to fill in myself in WordPress?

The embed code adds your post's layout, photos and text, with your featured image at the top. When you publish via code, you need to fill in these yourself in WordPress:

  • The post title.

  • The meta title and meta description (the title and summary search engines show).

If you use the plugin instead, it fills these in for you. To set your post's preview text and featured image, see Add preview text and a featured image to your Publish post.

What if only one photo shows?

If only one photo shows on your live page, the code that loads your post may not be running. Check these:

  • You pasted all of the code.

  • Your WordPress website allows JavaScript.

  • Any speed or caching plugins on your website aren't blocking JavaScript.

For more help, see Troubleshoot Publish posts on WordPress, or contact us through the chat bubble or at [email protected] with the link to your live page.

Did this answer your question?