https://github.com/laxmariappan/lwp-books
Basic example of how to create a WordPress plugin with custom post type, custom taxonomy and custom table.
https://github.com/laxmariappan/lwp-books
learn-wordpress php plugin-development wordpress-plugin
Last synced: 11 months ago
JSON representation
Basic example of how to create a WordPress plugin with custom post type, custom taxonomy and custom table.
- Host: GitHub
- URL: https://github.com/laxmariappan/lwp-books
- Owner: laxmariappan
- Created: 2024-12-10T22:32:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-13T12:48:58.000Z (over 1 year ago)
- Last Synced: 2025-03-31T08:19:50.876Z (about 1 year ago)
- Topics: learn-wordpress, php, plugin-development, wordpress-plugin
- Language: PHP
- Homepage: https://laxmariappan.github.io/lwp-books/
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Plugin Structure
@see: https://engineering.hmn.md/standards/structure/#plugin-structure
## Description
This plugin adds a custom post type for books.
## Installation
1. Clone the repository into your `wp-content/plugins` directory
2. Activate the plugin via the WordPress admin interface
3. Use the `Books` custom post type to add books to your site
4. View the books at `/books/`
5. View a single book at `/books/{slug}/`
6. Click on the subscribe button to subscribe to the book
7. View the subscribers at `/wp-admin/admin.php?page=subscribers-list`
## Further Development
1. Fork the repository
2. Create a new branch for your feature or changes
3. Create a new issue in the repository for the feature or changes
4. Create a pull request for your changes
## Improvements
> The following improvements can make your plugin development more efficient and maintainable.
1. Use classes for the plugin files.
2. Autoload classes using spl_autoload_register or PSR-4 autoloading.
3. Use WP PHPCS for coding standards.
4. Send an email to the site admin when a new subscriber is added.
5. Add a column to the books list table to show the number of subscribers.