Skip to content

[Feat] Updated the Wordpress Tutorial page in the Layer5 Docs#1047

Open
banana-three-join wants to merge 1 commit into
layer5io:masterfrom
banana-three-join:feature/banana-three-join/wordpress_tutorial
Open

[Feat] Updated the Wordpress Tutorial page in the Layer5 Docs#1047
banana-three-join wants to merge 1 commit into
layer5io:masterfrom
banana-three-join:feature/banana-three-join/wordpress_tutorial

Conversation

@banana-three-join
Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #1046

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
@welcome
Copy link
Copy Markdown

welcome Bot commented May 15, 2026

Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, please review the Layer5 Community Welcome Guide and sure to join the community Slack.
Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while peforming a commit.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the tutorial for embedding Meshery designs in WordPress, transitioning from a Media library upload method to enqueuing the design script via the theme's functions.php file. The review feedback identified a syntax error in the provided PHP code snippet, along with several typos and capitalization errors. Additionally, a suggestion was made to avoid redundant script tags in the Custom HTML block since the script is already handled by the theme.

![Embed Design](/kanvas/tutorials/images/embedding-design-in-wordpress/embeddesign.png)

4. This will show the `js` file to download and the HTML code snipped to copy.
3. This will show the `js` file to download and the HTML code snipped to copy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Typo: "snipped" should be "snippet".

Suggested change
3. This will show the `js` file to download and the HTML code snipped to copy.
3. This will show the js file to download and the HTML code snippet to copy.

5. Now, head over to WordPress and begin by uploading the `js` file to it. Ideally you will upload it to Media.

![Upload to WordPress](/kanvas/tutorials/images/embedding-design-in-wordpress/upload-js-wordpress.png)
4. Now, create a `js` folder in the path of your current wordpress theme
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Capitalization: "wordpress" should be "WordPress".

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

![Copy URL](/kanvas/tutorials/images/embedding-design-in-wordpress/copy-url.png)
![Copy JS](/kanvas/tutorials/images/embedding-design-in-wordpress/copy-js.png)

6. To the following script, replace `design_file_name.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 script.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Minor grammatical improvement ("copy the script"), capitalization fix for "WordPress", and removal of an extra space after the comma.

Suggested change
6. To the following script, replace `design_file_name.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 script.
6. To the following script, replace design_file_name.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() . design_file_name.js';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PHP code snippet contains a syntax error (missing opening quote) and the path should include the /js/ directory created in step 4 to match the instructions.

Suggested change
$script_uri = get_template_directory_uri() . design_file_name.js';
$script_uri = get_template_directory_uri() . '/js/design_file_name.js';

<script src="https://yourwordpressdomain/wp-content/uploads/2025/01/embedded-design-tutorial-exploring-kubernetes-pod.js" type="module" ></script>
```
![Copy URL](/kanvas/tutorials/images/embedding-design-in-wordpress/meshery-design-custom-html.png)
8. Paste the **Embed Code** copied from **Kanvas**.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the script is already being enqueued via functions.php in Step 6, the user only needs to paste the

element from the Embed Code. Including the <script> tag again is redundant and may lead to duplicate script loading.

Suggested change
8. Paste the **Embed Code** copied from **Kanvas**.
8. Paste the div element from the Embed Code copied from Kanvas.

@github-actions
Copy link
Copy Markdown

🚀 Preview deployment: https://layer5io.github.io/docs/pr-preview/pr-1047/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Update the content of the Wordpress tutorials in the Layer5 Docs

1 participant