Embed Widget
Install the Embed Widget

WordPress Installation

2min

For the Embed Widget to work in Wordpress, you'll need to give Wordpress the ability to embed Javascript widgets in posts/pages.

Embedding the code

The Code Embed plugin is best for embedding widgets in WordPress. It'll allow you to paste in the Ludus Embed Widget Javascript right into a page/post in WordPress without the editor blocking it due to the script tags.

Activating and using the Code Embed plugin:

1

On the left Admin Panel, select Settings and then select Code Embed.

In the Keyword field enter a base name (the default is CODE). This is what you will use to enter the embed on your pages. Then click Save.

In our example, we will use LUDUS as the keyword.

Document image

2

Ensure that you have Custom Fields activated in Preferences.

To get to preferences, open one of your pages/posts to edit. Then select the three dots on the right of the screen, and select Preferences.

Under Genera,l you should see Custom Fields at the bottom of the list. Verify it is turned on and close this window.

Document image

3

When you open/edit a page or post you will now see the custom fields option at the bottom of the page.

  • Enter the name of the custom field which would be the keyword you created plus a number or descriptor for this field. In our example that would be LUDUSMANUAL. As the Keyword was LUDUS and we want to call this MANUAL for this particular Embed. It could also have been LUDUS1, or LUDUSVOLUNTEER if we wanted.
  • Paste the embed code from your Ludus Account in the Value field.

Now that the Custom field is set up. Simply type {{code}} wherever on the page you want the embed to be. In our example that would be: {{LUDUSMANUAL}}

Click to save your page/post.

Note that the embed will only show on the public page once published.

Click to view your published page.

Document image






If you do not see "Custom Fields" for Step #2, you'll want to click the Screen Options button at the top of the page/post and check on "Custom Fields". If Custom Fields isn’t an option under “Screen Options”, then Advanced Custom Fields (ACF) may be installed. Jump to “Troubleshooting” in the article. Here is a more in-depth article if you need help finding Screen Options: https://www.wpbeginner.com/wp-tutorials/how-to-fix-custom-fields-not-showing-in-wordpress/

/i

🚨 Handling WP Rocket

If the WP Rocket plugin is installed on your Wordpress, WP Rocket can interfere with the Embed Widget loading on public pages when logged out of Wordpress. The most common issue is you'll see the Embed Widget when previewing your website while logged into WordPress, but anyone visiting your site cannot see it.

To fix this issue: ensure that minify JS and Defer JS are not enabled on the post/page for the WP Rocket settings.