-
Hi there,
Wondering if it’s possible to use WP ALL Import to create new posts using GenerateBlocks.
I’m working with a saved pattern:
<!– wp:paragraph –>
<p>{Introduction}</p>
<!– /wp:paragraph –><!– wp:generateblocks/image {“uniqueId”:”b9e87a59″,”sizeSlug”:”full”,”blockVersion”:2,”borders”:{“borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”},”metadata”:{“name”:”Featured Image”},”globalClasses”:[“RoundedBoxShadow”],”useGlobalStyle”:true,”globalStyleId”:”106beb6b”} /–>
<!– wp:paragraph –>
<p>{Paragraph 1}</p>
<!– /wp:paragraph –><!– wp:paragraph –>
<p>{Paragraph 2}</p>
<!– /wp:paragraph –><!– wp:generateblocks/container {“uniqueId”:”8a726459″,”isDynamic”:true,”blockVersion”:4,”flexDirection”:”row”,”spacing”:{“paddingTop”:”24px”,”paddingBottom”:”24px”,”marginTop”:”24px”,”marginBottom”:”24px”},”borders”:{“borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopColor”:”var(\u002d\u002dblackish)”,”borderRightColor”:”var(\u002d\u002dblackish)”,”borderBottomColor”:”var(\u002d\u002dblackish)”,”borderLeftColor”:”var(\u002d\u002dblackish)”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”}} –>
<!– wp:generateblocks/container {“uniqueId”:”758a3197″,”isDynamic”:true,”blockVersion”:4,”display”:”flex”,”flexDirection”:”column”,”alignItems”:”center”,”justifyContent”:”center”,”columnGap”:”24px”,”spacing”:{“paddingTop”:””,”paddingBottom”:””}} –>
<!– wp:generateblocks/container {“uniqueId”:”99a9702f”,”isDynamic”:true,”blockVersion”:4,”display”:”inline-flex”,”flexDirection”:”row”,”columnGap”:”24px”,”spacing”:{“paddingTop”:”24px”,”paddingBottom”:”24px”}} –>
<!– wp:generateblocks/button {“uniqueId”:”36b66ca3″,”hasUrl”:true,”target”:false,”blockVersion”:4,”display”:”inline-flex”,”typography”:{“fontWeight”:”700″},”spacing”:{“paddingTop”:”15px”,”paddingRight”:”20px”,”paddingBottom”:”15px”,”paddingLeft”:”20px”},”borders”:{“borderTopWidthMobile”:”3px”,”borderRightWidthMobile”:”3px”,”borderBottomWidthMobile”:”3px”,”borderLeftWidthMobile”:”3px”,”borderTopStyleMobile”:”solid”,”borderRightStyleMobile”:”solid”,”borderBottomStyleMobile”:”solid”,”borderLeftStyleMobile”:”solid”,”borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopColor”:”var(\u002d\u002dblackish)”,”borderRightColor”:”var(\u002d\u002dblackish)”,”borderBottomColor”:”var(\u002d\u002dblackish)”,”borderLeftColor”:”var(\u002d\u002dblackish)”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”,”borderRightLeftRadius”:”16px”,”borderLeftLeftRadius”:”16px”,”borderRightRightRadius”:”16px”,”borderLeftRightRadius”:”16px”},”backgroundColor”:”var(\u002d\u002dyellow)”,”backgroundColorHover”:”var(\u002d\u002dwhite)”,”textColor”:”var(\u002d\u002dblackish)”,”textColorHover”:”var(\u002d\u002dblackish)”} –>
Version 1
<!– /wp:generateblocks/button –><!– wp:generateblocks/button {“uniqueId”:”cdb48371″,”hasUrl”:true,”target”:false,”blockVersion”:4,”display”:”inline-flex”,”typography”:{“fontWeight”:”700″},”spacing”:{“paddingTop”:”15px”,”paddingRight”:”20px”,”paddingBottom”:”15px”,”paddingLeft”:”20px”},”borders”:{“borderTopWidthMobile”:”3px”,”borderRightWidthMobile”:”3px”,”borderBottomWidthMobile”:”3px”,”borderLeftWidthMobile”:”3px”,”borderTopStyleMobile”:”solid”,”borderRightStyleMobile”:”solid”,”borderBottomStyleMobile”:”solid”,”borderLeftStyleMobile”:”solid”,”borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopColor”:”var(\u002d\u002dblackish)”,”borderRightColor”:”var(\u002d\u002dblackish)”,”borderBottomColor”:”var(\u002d\u002dblackish)”,”borderLeftColor”:”var(\u002d\u002dblackish)”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”,”borderRightLeftRadius”:”16px”,”borderLeftLeftRadius”:”16px”,”borderRightRightRadius”:”16px”,”borderLeftRightRadius”:”16px”},”backgroundColor”:”var(\u002d\u002dteal)”,”backgroundColorHover”:”var(\u002d\u002dwhite)”,”textColor”:”var(\u002d\u002dblackish)”,”textColorHover”:”var(\u002d\u002dblackish)”} –>
Version 2
<!– /wp:generateblocks/button –>
<!– /wp:generateblocks/container –><!– wp:generateblocks/container {“uniqueId”:”ee65fc61″,”isDynamic”:true,”blockVersion”:4,”display”:”inline-flex”,”flexDirection”:”row”} –>
<!– wp:paragraph –>
<p>👆 Choose which version of this page you’d like 👆</p>
<!– /wp:paragraph –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –><!– wp:heading –>
<h2 class=”wp-block-heading”>What’s Included: </h2>
<!– /wp:heading –><!– wp:list –>
<!– /wp:list –>
<!– wp:heading –>
<h2 class=”wp-block-heading”>Features: </h2>
<!– /wp:heading –><!– wp:list –>
<!– /wp:list –>
<!– wp:heading –>
<h2 class=”wp-block-heading”>{Heading 2}</h2>
<!– /wp:heading –><!– wp:paragraph –>
<p>{Paragraph 4}</p>
<!– /wp:paragraph –><!– wp:list –>
<!– /wp:list –>
<!– wp:heading –>
<h2 class=”wp-block-heading”>{Heading 3}</h2>
<!– /wp:heading –><!– wp:list –>
<!– /wp:list –>
<!– wp:generateblocks/container {“uniqueId”:”7c73dfff”,”isDynamic”:true,”blockVersion”:4} –>
<!– wp:generateblocks/container {“uniqueId”:”4612fd84″,”isDynamic”:true,”blockVersion”:4,”spacing”:{“paddingTop”:”24px”,”paddingLeft”:”24px”,”paddingRight”:”24px”,”paddingBottom”:”24px”,”marginTop”:”24px”,”marginBottom”:”24px”},”borders”:{“borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopColor”:”var(\u002d\u002dblackish)”,”borderRightColor”:”var(\u002d\u002dblackish)”,”borderBottomColor”:”var(\u002d\u002dblackish)”,”borderLeftColor”:”var(\u002d\u002dblackish)”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”}} –>
<!– wp:heading –>
<h2 class=”wp-block-heading”>{Download Heading}</h2>
<!– /wp:heading –><!– wp:paragraph –>
<p>{Paragraph 6}</p>
<!– /wp:paragraph –><!– wp:generateblocks/image {“uniqueId”:”97194f99″,”sizeSlug”:”full”,”blockVersion”:2} /–>
<!– wp:generateblocks/container {“uniqueId”:”9c8bbb93″,”isDynamic”:true,”blockVersion”:4,”display”:”flex”,”displayMobile”:”flex”,”flexDirection”:”column”,”flexDirectionMobile”:”column”,”alignItems”:”center”,”alignItemsMobile”:”center”,”justifyContent”:”center”,”justifyContentMobile”:”center”,”rowGap”:”24px”} –>
<!– wp:generateblocks/button {“uniqueId”:”8fbf88cc”,”hasUrl”:true,”target”:false,”blockVersion”:4,”display”:”inline-flex”,”typography”:{“fontWeight”:”700″},”spacing”:{“paddingTop”:”15px”,”paddingRight”:”20px”,”paddingBottom”:”15px”,”paddingLeft”:”20px”},”borders”:{“borderTopWidthMobile”:”3px”,”borderRightWidthMobile”:”3px”,”borderBottomWidthMobile”:”3px”,”borderLeftWidthMobile”:”3px”,”borderTopStyleMobile”:”solid”,”borderRightStyleMobile”:”solid”,”borderBottomStyleMobile”:”solid”,”borderLeftStyleMobile”:”solid”,”borderTopWidth”:”3px”,”borderRightWidth”:”3px”,”borderBottomWidth”:”3px”,”borderLeftWidth”:”3px”,”borderTopStyle”:”solid”,”borderRightStyle”:”solid”,”borderBottomStyle”:”solid”,”borderLeftStyle”:”solid”,”borderTopColor”:”var(\u002d\u002dblackish)”,”borderRightColor”:”var(\u002d\u002dblackish)”,”borderBottomColor”:”var(\u002d\u002dblackish)”,”borderLeftColor”:”var(\u002d\u002dblackish)”,”borderTopLeftRadius”:”16px”,”borderTopRightRadius”:”16px”,”borderBottomLeftRadius”:”16px”,”borderBottomRightRadius”:”16px”,”borderRightLeftRadius”:”16px”,”borderLeftLeftRadius”:”16px”,”borderRightRightRadius”:”16px”,”borderLeftRightRadius”:”16px”},”backgroundColor”:”var(\u002d\u002dpink)”,”backgroundColorHover”:”var(\u002d\u002dwhite)”,”textColor”:”#ffffff”,”textColorHover”:”var(\u002d\u002dblackish)”} –>
Download
<!– /wp:generateblocks/button –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –><!– wp:paragraph –>
<p>{Conclusion}</p>
<!– /wp:paragraph –><!– wp:file /–>
<!– /wp:generateblocks/container –>I’m not sure if it’s possible, given the uniqueID requirement for the blocks, to do this.
Any help or suggestions would be appreciated 😀
-
Hi there,
Not sure what you mean, can you explain some more?
-
So I want to use WP All Imports to bulk create posts. The posts template has some standard Guttenberg blocks as well as a few Generate blocks containers… But I’m having trouble generating the containers and getting errors. I’m wondering if it’s because the GB need a UniqueID (maybe I could assign one to solve the issue), or if fundamentally GB isn’t compatible with WP ALL Imports/ any CSV import.
-
GB requires Unique IDs to create the style sheets properly.
I haven’t done something like this myself, so I’m afraid that I’m not familiar with the procedure.
I think GB may not be working in this case, it’s more for WP blocks, which don’t have IDs. -
I saw this thread:
Do you know if this person was able to successfully do it?
-
Alvind
Hi there,
The uniqueID attribute is dynamically generated and applied to GenerateBlocks elements that have custom styling. It’s used as a reference to generate and apply the corresponding CSS class for that block. Without it, the block won’t have its associated styles applied, which can cause the layout to break.
We’re not familiar with how WP All Import handles block attributes when creating posts, so there may be compatibility issues with blocks that use custom attributes beyond those supported by core WordPress blocks.
-
This would not solve my problem completely, but can I generate my own unique IDs for the blocks? This would allow me to generate the blog posts in HTML and then just paste the code into the WordPress editor.
I’ve tested it and it seems to work, but I don’t want to do anything on a large scale if it will potentially break later.
-
If it works, then yes, I think so.
- You must be logged in to reply to this topic.