Site logo

Archived topic

Unable to find revision history in CTA before footer hook

7 replies · Started by kazama on November 17, 2021

Viewing posts 1–8 of 8

Hi,

I am using the crypto demo theme. While making some changes to the "CTA before footer block" element, I mistakenly deleted certain code which has rendered the element useless on my site. I cannot revert changes via revision history because it is still not available in Elements. Or, is it?

Can you please pass me the original code used in the demo theme for the same?

I only need the code for displaying this block - http://prnt.sc/1zwobu7

Thanks.

Hi Kazama,

Try paste this to an blank block element:

<!-- wp:generateblocks/container {"uniqueId":"858e6d89","paddingTop":"80","paddingRight":"40","paddingBottom":"80","paddingLeft":"40","paddingRightMobile":"30","paddingLeftMobile":"30","backgroundColor":"var(\u002d\u002dcontrast-2)","textColor":"var(\u002d\u002dbase-3)","isDynamic":true,"blockVersion":2} -->
<!-- wp:generateblocks/grid {"uniqueId":"5a031acf","columns":2,"horizontalGap":40,"verticalGap":60,"verticalAlignment":"center","horizontalAlignmentTablet":"inherit","isDynamic":true,"blockVersion":2} -->
<!-- wp:generateblocks/container {"uniqueId":"ccaa1743","isGrid":true,"gridId":"126af6dc","width":75,"widthTablet":100,"widthMobile":100,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","removeVerticalGap":true,"removeVerticalGapTablet":true,"removeVerticalGapMobile":true,"alignmentTablet":"center","isDynamic":true,"blockVersion":2} -->
<!-- wp:generateblocks/headline {"uniqueId":"bfc3f0c3","element":"h3","textColor":"var(\u002d\u002dbase-3)","highlightTextColor":"","fontSize":38} -->
<h3 class="gb-headline gb-headline-bfc3f0c3 gb-headline-text">Questions?</h3>
<!-- /wp:generateblocks/headline -->

<!-- wp:generateblocks/headline {"uniqueId":"5ecc4b74","element":"p","textColor":"","fontSize":22,"marginBottom":"0"} -->
<p class="gb-headline gb-headline-5ecc4b74 gb-headline-text">Get in touch, we will be happy to help!</p>
<!-- /wp:generateblocks/headline -->
<!-- /wp:generateblocks/container -->

<!-- wp:generateblocks/container {"uniqueId":"9062e2b2","isGrid":true,"gridId":"126af6dc","width":25,"widthTablet":100,"widthMobile":100,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","removeVerticalGap":true,"removeVerticalGapTablet":true,"removeVerticalGapMobile":true,"alignment":"center","alignmentMobile":"center","isDynamic":true,"blockVersion":2} -->
<!-- wp:generateblocks/button-container {"uniqueId":"3e961ede","alignment":"center","alignmentTablet":"center","marginTopTablet":"40","isDynamic":true,"blockVersion":2} -->
<!-- wp:generateblocks/button {"uniqueId":"b7132b20","hasUrl":false,"backgroundColor":"","textColor":"var(\u002d\u002dbase-3)","backgroundColorHover":"#ffffff","textColorHover":"var(\u002d\u002daccent-2)","borderColor":"var(\u002d\u002dbase-3)","borderColorHover":"var(\u002d\u002dbase-3)","fontWeight":"600","fontSize":24,"paddingTop":"12","paddingRight":"36","paddingBottom":"12","paddingLeft":"36","borderSizeTop":"1","borderSizeRight":"1","borderSizeBottom":"1","borderSizeLeft":"1","borderRadiusTopRight":"50","borderRadiusBottomRight":"50","borderRadiusBottomLeft":"50","borderRadiusTopLeft":"50"} -->
<a class="gb-button gb-button-b7132b20 gb-button-text" href="#">Contact</a>
<!-- /wp:generateblocks/button -->
<!-- /wp:generateblocks/button-container -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/grid -->
<!-- /wp:generateblocks/container -->

Let me know if this helps :)

Works like a charm, thank you.

Is there a way to change the color of the element to cyan, for example? Can I change the hex code and be done with it?

Also, I am not able to add hooks to blocks. For instance, I created a new block that looks like this: http://prnt.sc/1zz686h

However, am not able to add a hook to place this particular block in bespoke locations across the site. As a result, the block is not visible on my homepage (or any other page) despite adding specific page rules.

I can see the "CTA before footer" block is paired with a generate_after_content hook. How do I achieve a similar feat with the above block in question?

Is there a way to change the color of the element to cyan, for example? Can I change the hex code and be done with it?

You should be able to use the Block's settings once you revert back to Visual editor after pasting the code. You can change the color from there. :)

However, am not able to add a hook to place this particular block in bespoke locations across the site. As a result, the block is not visible on my homepage (or any other page) despite adding specific page rules.

I can see the “CTA before footer” block is paired with a generate_after_content hook. How do I achieve a similar feat with the above block in question?

If a Block Element hooked to a part of the site isn't appearing, it's usually because the Display rule location is incorrect, or you're using a "Remove container condition" (for block element templates), or a plugin is messing with it. (like polylang displaying on the wrong language.).

It's possible that it doesn't display if you have child theme templates that completely removed the hooks as well. :)

If you can copy the site on a staging/development environment and let us have temporary backend access, we can help you check things out. You can use the private information text field to provide the details. :D

I am using the classic editor. Could that be the issue?

AFAIK, all the page rules are intact since they merely replicate the “CTA before footer” block.

The site's currently in development mode so I'd be more than happy to pass on backend access details. Please share your support email. I'll create a new login for your team.

Hi there,

Block elements, and blocks in general are not designed for the Classic editor. Trying to make it work with classic editor is just gonna to cause problems.

You would need to disable the classic editor in the element in order to work with it.

Yes, I figured that out. Thanks.

Glad to hear that!

This archived topic is closed to new replies.