Get SEO Data from the _app.js #1649
Unanswered
SamuelHadsall
asked this question in
Q&A
Replies: 1 comment
-
@SamuelHadsall If you are certain every page will always request the SEO data or you have proper fallbacks, I don't see why you couldn't read data from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I render all of my SEO data from the app.js so it's global to the site instead of passing the SEO component to each wp-template file?
I tested and can see that there is already pageProps that can get the fullHead data which looks like
pageProps?.__TEMPLATE_QUERY_DATA__?.page?.seo?.fullHead
Is there a better way of doing this?
Maybe do a separate graphql query here using nodeByUri?
Beta Was this translation helpful? Give feedback.
All reactions