Skip to content

vinay070403/books-plugin

Repository files navigation

<h1 align="center">📚 Books Plugin for WordPress</h1>

<p align="center">
A simple WordPress plugin to register a custom post type <code>book</code> with custom fields and a REST API endpoint.
</p>

---

## ✨ Features

- ✅ Custom Post Type: `book`
- 🔧 REST API: `/wp-json/books/v1/list`
- ✍️ Custom Fields: `Author`, `Publisher`
- 🧑‍💻 Admin UI for adding books

---

## ⚙️ Installation

1. Move `books-plugin.php` into a folder called `books-plugin`
2. Place the folder into `wp-content/plugins/`
3. Go to WordPress Admin → Plugins → Activate **Books Plugin**
4. Navigate to **Books → Add New** to add book data
5. Use **Custom Fields** for `Author` and `Publisher`
6. Test API: `http://localhost:{PORT}/wp-json/books/v1/list`

---

## 📸 Screenshots

### 📝 Add Book
![Add Book](assets/screenshots/add-book.png)

### 🏷️ Custom Fields
![Custom Fields](assets/screenshots/custom-fields.png)

### 🌐 REST API Output
![API Output](assets/screenshots/api-response.png)

---

## 📁 Folder Structure

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •