This custom Gutenberg block allows you to generate content using OpenAI's ChatGPT within the WordPress block editor. Enter a ChatGPT prompt, and the block will generate content based on the provided prompt.
- WordPress 5.0 or higher
- PHP 7.0 or higher
- Node.js and npm for building the block
- An OpenAI API key
- Clone or download this repository to your local machine.
- Navigate to the
chatgpt-block
directory in your terminal and runnpm install
to install the required dependencies. - Run
npm run build
to build the block. - In your WordPress installation, go to Plugins > Add New > Upload Plugin, and upload the
chatgpt-block
folder as a .zip file. - Activate the plugin.
- Go to Settings > ChatGPT Settings in your WordPress admin dashboard.
- Enter your OpenAI API key in the API Key field and save the settings.
- Create a new post or page, or edit an existing one in your WordPress admin dashboard.
- Add a new block by clicking the + icon and search for "chatgpt" in the block search bar.
- Select the ChatGPT Block.
- Enter a ChatGPT prompt in the block and click Generate Content.
- The generated content will be displayed within the block. You can edit or format the content as needed.
This project is licensed under the GNU General Public License v2.0.