tree planting website<\/a>!<\/p>\n\n\n\nNow, it’s shit – yes – but what I find fascinating is how the conversation is chained – you can ask the model to improve on the previous iteration, change things up a bit, base a new page on a previously created template and so on. For starting stuff off, this is just insanely interesting, I think. <\/p>\n\n\n\n
Earlier in the week, I tried using it to generate a simple WordPress loop:<\/p>\n\n\n\n
how can I order this loop by the following meta values - for the exhibition, order by meta_key \u2018start_date\u2019 and for the event by the meta_key \u2018_EventStartDate\u2019?\n\nTo order the loop by the start_date meta key for the 'exhibition' post type and the _EventStartDate meta key for the 'event' post type, you can modify the $args array in the WordPress loop as follows:\n\n$args = array(\n 'post_type' => array( 'event', 'exhibition' ),\n 'posts_per_page' => 10,\n 'order' => 'DESC',\n 'meta_query' => array(\n 'relation' => 'OR',\n array(\n 'key' => 'start_date', \/\/ Meta key for 'exhibition' post type\n 'compare' => 'EXISTS',\n ),\n array(\n 'key' => '_EventStartDate', \/\/ Meta key for 'event' post type\n 'compare' => 'EXISTS',\n ),\n ),\n 'orderby' => array(\n 'meta_value' => 'ASC', \/\/ Order by meta value in ascending order\n 'post_date' => 'DESC', \/\/ Then order by post date in descending order\n ),\n);\n\n$query = new WP_Query( $args );\n\nif ( $query->have_posts() ) {\n while ( $query->have_posts() ) {\n $query->the_post();\n \n \/\/ Output the post title and content\n echo '<h2>' . get_the_title() . '<\/h2>';\n echo '<div>' . get_the_content() . '<\/div>';\n }\n} else {\n \/\/ If no posts are found\n echo '<p>No posts found.<\/p>';\n}\n\nwp_reset_postdata();\n\nIn the $args array, we have added a meta_query parameter to specify that we want to order by the start_date meta key for 'exhibition' post type and the _EventStartDate meta key for 'event' post type. We have also added an orderby parameter to order by the meta value in ascending order, followed by the post date in descending order.\n\nNote that we have used the EXISTS compare operator to only include posts that have a value for the specified meta key. You can modify the compare operator or the meta key based on your specific needs.<\/code><\/pre>\n\n\n\n(this is the end of a longish chain of stuff) – but, it does pretty well here – this isn’t a coding faux pas of the first order – and more to the point, it could probably save me time – at least as much time as using Stack Overflow or my code library – not least of all because I can ask the model to tweak things such as the post type names or meta query.<\/p>\n\n\n\n
Overall, this is all deeply interesting stuff – and I have to say, potentially incredibly impactful. Take a look at the post Cheating is All You Need<\/a> to get some insight into both the meh-nado<\/em> response and what I think is a more insightful response to what we’re seeing here. I suspect these tools won’t remove our jobs – but I think they’ll deeply enhance the toolset that we all use when building modern websites. We are mere months after ChatGPT’s explosive entrance into the world and look at the insane number of tools already<\/em>. Just wait until this shit has properly matured, then we’ll see what the nay-sayers have got to say about all this…<\/p>\n","protected":false},"excerpt":{"rendered":"I’ve been starting to fiddle with ChatGPT a bit more recently, just to see what it can do, and where it fails. Today I had 20 minutes spare – so I asked ChatGPT to make me a Nike logo using SVG. It gave me this: …it’s pretty confident about what it’s created there – so … Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[422,370],"tags":[416,423,424,3],"_links":{"self":[{"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/posts\/2675"}],"collection":[{"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/comments?post=2675"}],"version-history":[{"count":3,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/posts\/2675\/revisions"}],"predecessor-version":[{"id":2679,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/posts\/2675\/revisions\/2679"}],"wp:attachment":[{"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/media?parent=2675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/categories?post=2675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/variousbits.net\/wp-json\/wp\/v2\/tags?post=2675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}