• Resolved andrej_uduc

    (@andrej_uduc)


    Is there a way to export the Custom block to re-use on another page? I can of course copy the template php and css files, but I don’t see a way to transfer the block as set in Dashboard/ Custom Blocks.

    I’m asking because in mid term we could have a community repository of such an exports (perhaps an xml file?) together with php and css …

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @andrej_uduc,
    Thanks for asking.

    Can you elaborate on what ‘on another page’ means?

    Any block should be available to add to any page.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    You can export all GCB blocks from the WP instance with:

    /wp-admin > Tools > Export > Content Blocks

    …then you can import all of those blocks via:
    /wp-admin > Tools > Import > WordPress > Run Importer (upload the .xml export file from above)

    Still, the imported blocks won’t work without this plugin active.

    Thread Starter andrej_uduc

    (@andrej_uduc)

    Thanks. This is exactly what I was looking for. So I don’t have to do it manually on every page separately.
    Now my suggestion would be to put this export to Custom Blocks section of the Dashboard, make it also export the php and css file (all together as a nice zip file). And then a nice import (Content Blocks + php and an option for css).
    I think this plugin has a great potential for the future of WordPress.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Thanks for your suggestion, and good to hear it’s working!

    Thread Starter andrej_uduc

    (@andrej_uduc)

    I am sorry to report now it doesn’t work anymore. I get an ‘invalid JSON file’ error when importing. Which is a problem as I made a block with many features and options and it’d take some time to manually move it to another website.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exporting custom blocks across pages?’ is closed to new replies.