Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/practical-tips.com/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mailchimp-for-wp domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/practical-tips.com/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the soledad domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/practical-tips.com/wp-includes/functions.php on line 6114
ChatGPT: Have a WordPress plugin created - this is how it works - Practical Tips

ChatGPT: Have a WordPress plugin created – this is how it works

by Corinna

While you used to need a programmer for this, today you can develop a WordPress plugin with ChatGPT. This way you can add new functions to the CMS individually.

Writing a WordPress plugin with ChatGPT: This is how it works

Before you can write a WordPress plugin with ChatGPT, you need to know how one works in the first place.

  • A WordPress theme is written in the server language PHP. You can easily generate the PHP code with ChatGTP.
  • To turn the finished code into a theme, you must first copy it into a text file and save it with the file extension “.php”.
  • Now move the created php file to a new folder and name it the same as the file.
  • Compress the folder. In WordPress, navigate to “Install Plugins” via the sidebar.
  • Click on “Upload Plugin” at the top and install the plugin you created.

WritingPHP with ChatGPT: How to build the prompt

To get a response from ChatGPT, you must first ask a question. This is called a prompt.

  • Phrase your prompt as specifically as possible. Specify that a WordPress plugin should be written in PHP 8: “Write a PHP compatible WordPress plugin that… “
  • Describe exactly what you want your plugin to do and how it works. Be sure to include any settings pages that are needed.
  • If the generated result still does not meet your expectations, ask for a correction. ChatGPT recognises the context and changes the previously delivered code so that it performs the new task.
  • Beware that ChatGPT can also make mistakes. Especially in safety-critical areas, you should therefore test the plugin carefully before productive use and have it checked by experienced programmers.

Related Articles

Leave a Comment