June 21, 2023

Add a Codepen to Bricks Builder with External JS (Bricks 101 Part 29)

Play Video

Learn how to add a Codepen to Bricks Builder that includes external JavaScript (JS). Codepen is a popular platform where developers can showcase and discover front-end code snippets. This tutorial will guide you through the process of integrating a Codepen into your Bricks Builder website, with a particular focus on handling external JS.

Steps to Add a Codepen to Bricks Builder

  1. Locate the Codepen you want to add to your website
    For this tutorial, we are using a Codepen that includes HTML, CSS, and JavaScript, along with an external JS library.
    Locate the Codepen you want to add to your website
  2. Add a Code Widget to your Bricks page
    In Bricks Builder, navigate to your elements and select the Code Widget. Drag and drop it into the desired container on your page.
    Add a Code Widget to your Bricks page
  3. Copy the HTML from the Codepen
    Go back to your Codepen and copy all the HTML code.
    Copy the HTML from the Codepen
  4. Paste the HTML into the Code Widget
    In Bricks Builder, paste the copied HTML into the Code Widget. Click on “Execute Code” to render the HTML on your page.
    Paste the HTML into the Code Widget
  5. Add the CSS from the Codepen
    Copy the CSS from the Codepen. In the Code Widget, type <style></style> at the bottom of the HTML code. Paste the CSS code between these tags.
    Add the CSS from the Codepen
  6. Add the JavaScript from the Codepen
    Copy the JavaScript from the Codepen. In the Code Widget, type <script></script> at the bottom of the code (below the CSS). Paste the JavaScript code between these tags.
    Add the JavaScript from the Codepen
  7. Add the external JS library
    In the Codepen, locate the external JS library in the JS section. Copy the URL of the library. In the Code Widget, find the closing </body> tag in the HTML code. Above this tag, type <script src=""></script>. Paste the URL of the JS library between the quotes in the src attribute.
    Add the external JS library
  8. Save and view your page
    Click “Save” in Bricks Builder and view your live page to see the Codepen in action.

When should you Add a Codepen to Bricks Builder

Adding a Codepen to your Bricks Builder website can be beneficial in several scenarios. For instance, if you find a Codepen that includes a unique navigation menu, an interactive animation, or a dynamic form, you can integrate it into your site to enhance its functionality and user experience. Codepen is a treasure trove of creative front-end ideas, and integrating these into your site can help it stand out.

Common Issues

  1. Codepen not displaying correctly
    Ensure that you have correctly copied and pasted the HTML, CSS, and JavaScript from the Codepen into the Code Widget in Bricks Builder. Also, make sure to click “Execute Code” after pasting each type of code.
  2. Animations or movements not working
    This is likely due to the external JS library not being properly added. Make sure to add the <script src=""></script> tag with the URL of the library above the closing </body> tag in the HTML code.

Required Resources

Bricks Builder Logo
Payment required
Credit to Web Squadron
Web Squadron is a popular YouTube channel dedicated to providing informative tutorials, tips, and insights on web development and design. With a strong focus on WordPress and website builders like Bricks Builder, the channel aims to help users of all skill levels, from beginners to advanced developers, create and optimize their websites. By offering easy-to-understand, step-by-step guidance, Web Squadron provides practical and valuable content.
Visit
Add a Codepen to Bricks Builder with External JS (Bricks 101 Part 29)
Welcome back!
Enter your Helwp credentials to sign in.

No Account yet? Sign Up

My Account
Menu
Give Feedback
Describe your feedback *
Rate Helwp
Share
Facebook
Twitter
LinkedIn
Reddit
Email
WhatsApp
Telegram
Pocket
Report
Problem *
Describe the problem
Want us to reply?
Your E-Mail
Affiliate Disclosure

At Helwp, we’re committed to transparency and honesty. Therefore, we want to inform you that some of the links on our website are affiliate links. This means that, at no additional cost to you, we may earn a small commission if you click through and make a purchase.

We only promote products or services that we genuinely believe in. These affiliate commissions help us to maintain the website and continue to provide you with free, high-quality WordPress content.

If you are interested in how you can support us even further, check out our support page.