-
Notifications
You must be signed in to change notification settings - Fork 30
WordPress Theme Config WordPress as a headless CMS
Drew Baker edited this page Apr 25, 2021
·
1 revision
- Install
fuxt-backend
theme into WordPress from here. Rename theme directory to the site name appended with-backend-2019
, soexample-backend
. Also change the theme name to the same instyle.css
.- Disable privacy mode on WordPress host (if applicable)
- Install promoted Plugins
- 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.
- Save Permalinks in the WordPress dashboard (WP-GQL requires this) to the
Post name
option.- Use the
<wp-link>
component to handle parsing the WordPress URL's into Nuxt friendly paths.
- Use the
- Define menu locations in
/functions/theme-config.php
. - 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.- One of these field groups is Site Options, which allows Google Analytics to work. You need ACF Pro installed for this to work.
- See below for instructions on how to remove the ACF Pro requirement.
- In the frontend repo, rename your
.env.example
to.env
and configGQL_ENDPOINT
to be the GraphQL endpoint from the WordPress you installed above.