Embedding a Meshery Design in a WordPress Post

Learn how to Embed a Meshery Design in a WordPress Post

In this tutorial, we will learn how to embed a Meshery Design in a WordPress post using the Embed option in Kanvas.

This tutorial assumes that you have created a design or have an existing one. If not, you can use one of the numerous public designs available in Kanvas for this tutorial.

  1. WordPress: A running WordPress instance or deployment, serving as the sample application for this tutorial.
  2. Meshery Catalog Extension: The Meshery Catalog extension enabled within your Meshery environment to access pre-configured cloud-native design patterns.
  1. Expand the Actions menu on the left and select export.

    Expand Designs

  2. Click the download icon next to Embed Design

    Export Design

  3. This will show the js file to download and the HTML code snippet to copy.

    Embed Design

  4. Now, create a js folder in the path of your current WordPress theme

  5. Next, copy the downloaded js file into this folder.

    Copy JS

  6. To the following script, replace design.js with the name of the js file which you just downloaded. Once this is done, go to the functions.php file in your current WordPress theme and copy the script.

    function kanvas_design_script() {
          $script_uri = get_template_directory_uri() . '/js/design.js';
          wp_enqueue_script_module(
                            'kanvas-design', 
                            $script_uri, 
                            array(), 
                            '1.1.0', 
                );
    }
    add_action('wp_enqueue_scripts', 'kanvas_design_script');
    

    Copy Script

  7. Open the WordPress post where you want to embed the design in edit mode and add a Custom HTML block.

    Copy URL

  8. Paste the div element from the Embed Code copied from Kanvas.

    Copy URL

  9. Click Preview to validate that the design is rendered.

    Copy URL

  10. Publish the WordPress post and share.

Related Reading

Last modified June 7, 2026: Restructure the docs (3b14dee42b3)