Skip to content

Create WordPress Theme using React Only! Demo: { username: 'user', password: 'user' }

Notifications You must be signed in to change notification settings

zonayedpca/ReactPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

  • The production version of ReactPress only works if your WordPress site is installed in root directory. Like example.com or subdomain.example.com is okay. But if you want to use it in any child directory like example.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.

Demo

  • Log In and make a post! See it yourself in action!
  • Demo
username: user
password: user

Development

  • ReactPress is using proxy to work with WordPress during development process assuming your WordPress site is running under localhost. If you are running your WordPress in different port, then please open package.json, find proxy and replace your WordPress localhost 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

Production

  • 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 a zip 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

Contribution

Testing

About

Create WordPress Theme using React Only! Demo: { username: 'user', password: 'user' }

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published