From shortcode to block
summary
Takes a shortcode plugin and turns it into a dynamic block that renders a custom post type (WCFAQ) and taxonomy (wceufaq_cat) both in the editor and on the front end, while keeping the original shortcode for backward compatibility. Uses the WordPress block scaffold (wp create-block), npm install/build/start, and reuses the shortcode PHP logic in render.php. Pulls content into the editor with useEntityRecords from @wordpress/core-data, adds an inspector dropdown for taxonomy terms and color controls, and applies styles with CSS custom properties via useBlockProps, which work in editor and front end.
AI-written summary · about
