A frontend for admin area of WordPress, using WP REST API and React. It works with Self-Hosted WordPress
A frontend for admin area of WordPress, using WP REST API and React. It works with Self-Hosted WordPress.
This project was bootstrapped with Create React App.
Make sure you have WP REST API and JWP plugin installed in your wordpress
git clone https://github.com/rnaga/wordpress-rest-admin.git .
npm install
npm start
git clone https://github.com/rnaga/wordpress-rest-admin.git .
docker-compose up --build
Once all containers are up, visit http://localhost:3000 and login with the following creds
Site URL: http://localhost
Username: demo
Password: demo
cd /path/to/your/project
npm install
npm i wordpress-rest-admin
import WPAdmin from 'wordpress-rest-admin/WPAdmin';
import contents from 'wordpress-rest-admin/contents';
import loginLogo from './WordpressLogo.svg';
import headerLogo from './WordpressLogo.png';
...
<WPAdmin
loginLogo={loginLogo}
headerLogo={headerLogo}
defaultContent={defaultContent}
contents={contents}
/>
See example here
npm install yo -g
git clone https://github.com/rnaga/wordpress-rest-admin.git .
cd ./generator
npm link
There is "generator" directory in this repo. Go under the directory, then run "npm link" as above
yo wordpress-rest-admin:contents [mypage]
It creates new files(components) under "contents" directory (see blow)
import mypage from './contents/mypage';
....
<WPAdmin contents={{mypage}} />
This is useful in case you want to modify existing pages
yo wordpress-rest-admin:contents --copy-from=[content]
where "content" is one of the following.
categories comments dashboard pages posts media profile settings tags users
See example here
By default, the generated project uses the latest version of React.
You can refer to the React documentation for more information about supported browsers.