Components Shortcode

With the old global blocks, I was able to use the shortcode to insert those global blocks into native wordpress posts. What’s the shortcode for Components?

I don’t think this feature exists yet for components. I can make sure it is added to our requests and it’s a great idea. Thanks a bunch have a great day.

so there’s zero short code like there was for global blocks?

if not, this will break quite a few of my websites without a solution to fix it.

No not currently closet you could get it is to add a component to a page and use cs_content. I can set it as a priority, internally the components use a different ID system so we’d setup a UI for you to grab the ID and thus the shortcode.

I think this is what you’re looking for: [cs_gb name="…"]

At … the name of the global block.

cs_gb will still work for older components / global blocks.

The new components in 6.0.3 will have a [cs_component id="..."] api. See the component export section for details on usage. Docs will have a section on this when we release that.

Thanks a bunch everybody. Let us know if you have any questions or issues.

image

1 Like

Potential bug: When one clicks on that shortcode, it is selected (presumably to be able to copy it). However Ctrl-C does not work. Right-click > copy does work, though. This is in Chrome on Windows 11.

Hi @striata,

Unfortunately, you can’t copy that as Global Block shortcode, but you can copy it by a right click as you have already done.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.