I’m using WP All Import to speed up my post creation process and I’d like to start incorporating GenerateBlock containers, but came across a potential issue that I need clarity on.
Is the field “uniqueID” necessary for creating GB containers?
For context, my posts feature 17 businesses and each business needs its own container (to keep things organized), which means I need to create 17 GB containers for each post.
On the WP All Import side, this is how I’ve currently set things up (capitalized fields are pulled in from a sheet that I upload to WP All Import):
!– wp:heading –>
<h2>RESTAURANT TITLE</h2>
<!– /wp:heading –>
<!– wp:paragraph –>
<p>COST PER PERSON</p>
<!– /wp:paragraph –>
<!– wp:paragraph –>
<p>PHONE NUMBER</p>
<!– /wp:paragraph –>
—
But I want it set up like this (without needing a unique ID for each GB container):
<!– wp:generateblocks/container \{“uniqueId”:”c457acb1″,”isDynamic”:true,”blockVersion”:2,”className”:”restaurant-container”\} –>
!– wp:heading –>
<h2>RESTAURANT TITLE</h2>
<!– /wp:heading –>
<!– wp:paragraph –>
<p>COST PER PERSON</p>
<!– /wp:paragraph –>
<!– wp:paragraph –>
<p>PHONE NUMBER</p>
<!– /wp:paragraph –>
<!– /wp:generateblocks/container –>
If I can’t create a GB container without a unique ID, how could I create the block with PHP?