Skip to content

Instantly share code, notes, and snippets.

@ggutenberg
Created November 5, 2019 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggutenberg/f9aa254ffa40a29f74aec749124b8c05 to your computer and use it in GitHub Desktop.
Save ggutenberg/f9aa254ffa40a29f74aec749124b8c05 to your computer and use it in GitHub Desktop.
Creating a WordPress post from a Word document

Creating a WordPress post from a Word document

  1. Import docx using Mammoth

    1. Scroll to bottom of the Edit page
    2. In the Mammoth .docx converter section, select your .docx file
    3. Make sure that Visual is selected, and click Insert into editor
    4. It will appear as though nothing has changed, but click Update anyway

    The contents will now appear as a Text Block at the top of the WPBakery Page Builder, however if you look at the actual page on the site, the formatting is off. In order to fix the formatting:

    1. Edit the Text Block (mouse over it and click the pencil icon)
    2. When the editor opens, click Save Changes
    3. Click Update
  2. Fix heading formatting if necessary

    1. Select text
    2. Click T > Paragraph
  3. Fix hyperlinks if necessary

  4. Fix additional formatting

    • Tip: Use shift + enter to create a new line without creating a new paragraph
  5. Delete the block that this was replacing if necessary, and Update again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment