Reactjs headless Wordpress theme configure SEO

admin2025-01-07  3

I have deployed reactjs as theme to wp. Now I have question about SEO configuration for react-routes. If I use wordpress (headless) as backend and reactjs as client side. Should I make reactjs server-side or there are more ways to solve SEO problem.

I also used react-helmet but it's only makes titles and content while visiting site not like when sharing facebook or google search.

Which is the best way to solve it.

I have deployed reactjs as theme to wp. Now I have question about SEO configuration for react-routes. If I use wordpress (headless) as backend and reactjs as client side. Should I make reactjs server-side or there are more ways to solve SEO problem.

I also used react-helmet but it's only makes titles and content while visiting site not like when sharing facebook or google search.

Which is the best way to solve it.

Share Improve this question edited Dec 12, 2019 at 22:00 Shark asked Dec 12, 2019 at 21:34 SharkShark 214 bronze badges 3
  • Keep in mind that questions need to be answerable in a concrete manner, this isn't a discussion forum. The create react wptheme just generates a react scaffold, it doesn't create a WP theme, so it's not clear what you mean by configuring SEO. If it's how to get Yoast SEO working with your React code, that's a Yoast SEO question and offtopic here. Please edit your question to a specific thing – Tom J Nowell Commented Dec 12, 2019 at 21:50
  • I edited my question now – Shark Commented Dec 12, 2019 at 22:08
  • hmm I think I have misunderstood what the create-react-wptheme is, this isn't a WP site at all but a standalone React application that talks to and interacts with WordPress, it is not a WP theme. This is as close to WP as a native mobile app that talks to a WP site, WP knowledge will be of extremely limited use to you here, and none of the plugins will do anything for you as they assume a PHP generated standard WP theme. Keep in mind the instructions you follow are not official WP instructions, and there is no official WP react headless theme or standard – Tom J Nowell Commented Dec 13, 2019 at 0:48
Add a comment  | 

1 Answer 1

Reset to default 0

Which is the best way to solve it.

There is no WP based solution to solve this. Any WP solutions will modify the output of a WP theme, but you don't have a WP theme. What you have is a React web application that talks to a REST API and gives the appearance of a WP frontend.

To be clear, your React frontend is not a WordPress site, and it is not a WordPress theme. It's a pure JS frontend built in React that grabs content from an API.

You can ingest data from WordPress, but generating SEO tags, making your markup search engine friendly, that's a pure React problem that has little or nothing to do with WordPress. There is no way for plugins to change your apps header tags, or other things.

This is one of the costs of going headless, you need to implement this yourself. As such, you can't just add seo. Instead, you need to research what these plugins do, and reproduce it independently, or via libraries from the JS community.

Consequently, you'll need to understand what it is that needs to be done, and there won't be a 1 size fits all solution. You won't find a JS library that does all the things you need, and will need to implement various things independently.

WP resources and communities will be of limited value as a result.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736255033a252.html

最新回复(0)