Skip to content

WordPress Theme Config WordPress as a headless CMS

Drew Baker edited this page Apr 25, 2021 · 1 revision
  1. Install fuxt-backend theme into WordPress from here. Rename theme directory to the site name appended with -backend-2019, so example-backend. Also change the theme name to the same in style.css.
    1. Disable privacy mode on WordPress host (if applicable)
    2. Install promoted Plugins
    3. Go to Settings > General, and set the "Site Address (URL)" to be the frontend URL. Often times you'll have to email your host (Flywheel) to get them to allow this field to be edited.
    4. Save Permalinks in the WordPress dashboard (WP-GQL requires this) to the Post name option.
      1. Use the <wp-link> component to handle parsing the WordPress URL's into Nuxt friendly paths.
    5. Define menu locations in /functions/theme-config.php.
    6. If you want to use ACF, there are some default fields we recommend, you can find the file to import from the theme directory /acf/ or here.
      1. One of these field groups is Site Options, which allows Google Analytics to work. You need ACF Pro installed for this to work.
      2. See below for instructions on how to remove the ACF Pro requirement.
  2. In the frontend repo, rename your .env.example to .env and config GQL_ENDPOINT to be the GraphQL endpoint from the WordPress you installed above.
Clone this wiki locally