This guide describes how to quickly generate and tune WordPress block themes with Cursor AI. The entire process can be completed in less than ten minutes.
Make sure that the development environment (such as Valet) is installed and run.
Create a project folder and prepare reference materials (such as web page screenshots).
Create a .cursor
folder in the project and add rules:
Content width 900px, maximum 1200px
Use clamp()
for responsive layout
Turn off custom colors and font sizes
Follow WordPress coding standards
Topic name: AI construction
Storage location: wp-content/themes/
Required files: style.css
, theme.json
, functions.php
, header.php
, footer.php
Main templates: index.php
, single.php
, archive.php
, home.php
Design requirements:
Random selection of pictures
Provide rule files, reference screenshots, and official WordPress documents (optional).
Send a prompt, requiring the AI to generate a topic.
Confirm whether theme.json
generated by the AI meets the requirements.
Adjust HTML structure, optimize styles, and images.
Test responsive effects and correct contrast problems.
Enable themes in WordPress.
Go to the theme editor for final adjustments