{"id":11752,"date":"2023-01-04T06:26:13","date_gmt":"2023-01-04T06:26:13","guid":{"rendered":"https:\/\/nieuw.wpprovider.nl\/chatgpt-makes-a-working-custom-wordpress-plugin\/"},"modified":"2023-01-04T06:26:13","modified_gmt":"2023-01-04T06:26:13","slug":"chatgpt-makes-a-working-custom-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/nieuw.wpprovider.nl\/en\/chatgpt-makes-a-working-custom-wordpress-plugin\/","title":{"rendered":"ChatGPT makes a working custom WordPress plugin"},"content":{"rendered":"<p>In December, ChatGPT crossed the 1 million user mark and Twitter has many creative questions and applications for the chatbot powered by AI. The language model, created by <a href=\"https:\/\/openai.com\/blog\/chatgpt\/\" target=\"_blank\" rel=\"noopener\">OpenAI,<\/a> is powered by GPT-3.5, a suite of models trained on text and code prior to Q4 2021. The model has a dialogue format that allows ChatGPT to &#8220;answer follow-up questions, admit mistakes, refute incorrect premises, and reject inappropriate requests.&#8221; While some predict the end of search engines and sound the death knell for human-generated writing, others are fascinated by the potential of AI systems to fundamentally change the creation process. WordPress developer Johnathon Williams brought this closer when he asked ChatGPT to create a WordPress plugin. Normally, creating a plugin requires a certain level of technical skill. Williams showed that, with a little expert guidance, ChatGPT can dramatically reduce the time it takes to expand WordPress. Williams installed the plugin and found that it worked on the first try. Although he didn&#8217;t save the command from this first attempt, he published a gist on GitHub of the generated code. On a second attempt to create another plugin, he used the following command: <em><span style=\"text-decoration: underline;\">Create a custom WordPress plugin called \u201cBig Daddy Media\u201d that deletes images older than one year from the media library. OOP. Custom admin screen. one button delete. log the full URL of all deleted media files.<\/span><\/em> Williams said that while he had mixed results with his prompts, he got the best results by asking ChatGPT to generate entire functions rather than specific filters or actions. <\/p>\n<blockquote class=\"twitter-tweet\">\n<p dir=\"ltr\" lang=\"en\">Open AI&#8217;s ChatGPT can generate an entire WordPress plugin based on a simple description. Watch it work: <a href=\"https:\/\/t.co\/LZQbxFq0aP\" target=\"_blank\">pic.twitter.com\/LZQbxFq0aP<\/a><\/p>\n<p> \u2014 Johnathon Williams (@johnofhousejohn) <a href=\"https:\/\/twitter.com\/johnofhousejohn\/status\/1599932681076473856?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">December 6, 2022<\/a><\/p><\/blockquote>\n<p><script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script> Naturally, we were also curious and gave a simple command to create a WordPress dashboard plugin with the best-selling products: <em>Create a custom WordPress plugin called &#8220;Top orders&#8221; that displays WooCommerce&#8217;s best-selling products in the WordPress dashboard.<\/em> With the result below: <iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/XYWjmGbXKCM\" width=\"560\" height=\"500\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe> Theoretically, with additional training on plugin best practices and common architecture, ChatGPT could be used by people at all levels to extend WordPress in creative ways. \u201cVery soon, describing the WordPress plugin you need to ChatGPT will generate a new plugin faster than searching for an existing plugin in the plugin directory,\u201d Williams said. &#8220;Of course, this will not apply to all types of plugins. But for relatively simple plugins that perform well-established tricks&#8230; very soon <em>though, probably<\/em> read &#8216;now&#8217;.&#8221; Ps. this blog post was written using ChatGPT \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In December, ChatGPT crossed the 1 million user mark and Twitter has many creative questions and applications for the chatbot powered by AI. The language model, created by OpenAI, is powered by GPT-3.5, a suite of models trained on text and code prior to Q4 2021. The model has a dialogue format that allows ChatGPT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10861,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-11752","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geen-onderdeel-van-een-categorie"],"acf":[],"_links":{"self":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts\/11752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/comments?post=11752"}],"version-history":[{"count":0,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts\/11752\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/media\/10861"}],"wp:attachment":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/media?parent=11752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/categories?post=11752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/tags?post=11752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}