____________________
Publishing to WordPress Via Code: Overview
This publishing method will allow you to upload your blogs to your website in scenarios, for example when:
The plugin method isn’t possible due to connection issues
You need to publish to multiple websites
Your website hasn’t been launched or it’s in staging/testing mode
You want to post your blog in a different section of your website (like “Pages” instead of the “Post” section)
____________________
How to Publish to WordPress Via Code
Before uploading your post you need to have your publishing details saved. If you haven't done this, have a look at the article here.
Once your publishing settings are complete, the steps below will guide you on how to do upload to your website via code.
1. Click Publish to start uploading your post
2. Once the upload is complete, click Copy Link to copy your post's HTML to your clipboard.
3. Log into your WordPress website.
4. Navigate to the post or page where you would like the blog to be placed.
👉 If you are using the Classic Editor, continue with the steps here
👉 If you are using Gutenberg, continue with the steps below
Gutenberg
1. Add the title of your post
2. To add your Publish Post hover over "Add Text..." and click the plus icon
3. Search for "Custom HTML" and then click it, to add it to your page.
4. Now Paste the code that you copied from Publish.
5. Click the preview to see your blog.
Your blog should now load and be fully published! Once you are happy with how it looks, make your blog live and you should be good to go.
Classic editor
1. To add your Narrative Publish post, click the text editor tab.
2. Paste the link you copied from your Narrative Publish post.
3. Press Preview to view your post.
Your blog should now load and be fully published! Once you are happy with how it looks, make your blog live and you should be good to go.
____________________