- The production version of
ReactPress
only works if your WordPress site is installed in root directory. Likeexample.com
orsubdomain.example.com
is okay. But if you want to use it in any child directory likeexample.com/childdir
then it will not work! - Also it works only with
localhost
version 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
localhost
WordPress 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
ReactPress
is 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
, findproxy
and replace your WordPresslocalhost
URL 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
build
command to get the production version of your application:
npm run build
- You will find a new directory named as your React Application Project inside
build
directory. This will be your WordPress theme. You can make azip
version 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
public
directory