- The production version of
ReactPressonly works if your WordPress site is installed in root directory. Likeexample.comorsubdomain.example.comis okay. But if you want to use it in any child directory likeexample.com/childdirthen it will not work! - Also it works only with
localhostversion of WordPress during development process. - This mechanism is completely depended on WP REST API and also another third party plugin. Make sure you have installed them on your
localhostWordPress website during development process. - Don't Worry! It will take care of these two 3rd party plugins itself during production. - Please follow WP REST API Documentation to interact with your WordPress site.
username: user
password: user
ReactPressis using proxy to work with WordPress during development process assuming your WordPress site is running underlocalhost. If you are running your WordPress in different port, then please openpackage.json, findproxyand replace your WordPresslocalhostURL with your own.- Rest of the processes are just like React Application, Install all the dependecies:
npm install
- If you want to start development server:
npm start
- Use relative links to make a request to WP REST API. Like:
/wp-json/wp/v2/posts?per_page=5
- Just like any other React Application, you can run
buildcommand to get the production version of your application:
npm run build
- You will find a new directory named as your React Application Project inside
builddirectory. This will be your WordPress theme. You can make azipversion of this directory, or you can copy this directory to your WordPress directory. - If you want a different name of your WordPress theme, clone the repo with your name. Like:
git clone https://github.com/zonayedpca/ReactPress.git yourThemeName
- You may want to add some additional info, screenshot and so other things. You can always do these things from
publicdirectory