Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 0b583dd

Browse files
committed
Add handling for settings custom pages
1 parent c47c802 commit 0b583dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/wordpress/_global/processPostTypeQuery.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export default async function processPostTypeQuery(
5454
// Retrieve default SEO data.
5555
response.defaultSeo = formatDefaultSeoData({homepageSettings, siteSeo})
5656

57-
const post = postData?.[postType]
57+
// Retrieve post data.
58+
const post =
59+
postData?.[postType] ?? // Dynamic posts.
60+
postData?.additionalSettings?.additionalSettings?.[postType] // Settings custom page.
5861

5962
// Set error props if data not found.
6063
if (!post) {

0 commit comments

Comments
 (0)