# Javascript plugin does not work in Custom Code

**URL:** <https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647>\
**Category:** Visual Editor Help\
**Tags:** visual-editor\
**Created:** [May 26, 2023, 2:54pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647 "2023-05-26T14:54:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketanshah66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/ketanshah66/32/2554_2.png) [@ketanshah66](https://forum.builder.io/u/ketanshah66)\
**Post date:** [May 26, 2023, 2:54pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/1 "2023-05-26T14:54:47Z")

</div>

**Builder content link**

> **[Builder.io: Drag & Drop Headless CMS](https://builder.io/content/f6271ff992204c01bbb9923721075d06/)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

**Builder public api key**  
e7a9e62cc8fb4fedb5562850d5fbeb66

**What are you trying to accomplish**  
I want to integrate a javascript carousel plugin on a page

**Screenshots or video link**  
Page created in [builder.io](http://builder.io) which is not working -  
screenshot - [Screenshot by Lightshot](https://prnt.sc/1s-g8q6mdQM2)  
URL - [Test - My WordPress](https://kory.blog/test2/)

A plain HTML page which is working fine -  
screenshot - [Screenshot by Lightshot](https://prnt.sc/kqejmNx2CJ9t)  
URL - [Slick Playground](https://kory.blog/test/slick-master/)

**Code stack you are integrating Builder with**  
Wordpress

**Reproducible code example**  
Here is the fiddle where you can see the code - [Builder.io: Drag & Drop Headless CMS](https://builder.io/fiddle/f1c05569f8614c07b639b1c8202efaab)

I have tried toggling the Replace Nodes and Scripts Client Only options in the Advanced tab, but the code doesn’t work.

Basically it doesn’t load the plugin function.

I have tried using a different plugin, but that has the same issue.

I think I am missing some settings. Can you help me out?

Thanks  
Ketan

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [May 26, 2023, 6:13pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/2 "2023-05-26T18:13:21Z")

</div>

Hello Ketan,

I would be happy to assist.

I’d like to request some more information before we move towards a solution.

Are you using Builder to create the carousel and then copying the code to Wordpress via the method in the video on this page, ensuring the Publish button has been pressed?  
https://www.builder.io/c/docs/guides/wordpress

Please let me know if I am misunderstanding the issue.

---

<div class="post-metadata">

**Author:** ![ketanshah66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/ketanshah66/32/2554_2.png) [@ketanshah66](https://forum.builder.io/u/ketanshah66)\
**Post date:** [May 27, 2023, 7:14am UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/3 "2023-05-27T07:14:52Z")

</div>

Thanks Julius.

Actually I have created the carousel in an HTML file. Once it was working properly, I create a page in the Builder and copied the code to a Custom Code element in that page. After publishing the code, I used the “Pasting Builder HTML into WordPress” method to integrate the page in Wordpress.

I have built an entire landing page in Builder using its default components and using it in Wordpress without any issue. It is just that when I tried to use a 3rd party javascript plugin for carousel, I am facing this issue.

Let me know if you need more information.

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [May 30, 2023, 8:12pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/4 "2023-05-30T20:12:55Z")

</div>

Hello ketanshah66,

Thanks for clearing that up for me!  
I’ve been attempting a few solutions and have some suggestions.

Builder has it’s own easily customizable carousel under the Layout tab that also utilizes the Slicker library.

If you’re still set on using this custom component, would it be feasible to include the `<script>` and `<link>` tags in your own codebase? I was able to get the component functioning unreliably, which leads me to believe the elements or tags are being loaded out of order.

Please let me know if you’d like to continue searching for an alternative solution.

---

<div class="post-metadata">

**Author:** ![ketanshah66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/ketanshah66/32/2554_2.png) [@ketanshah66](https://forum.builder.io/u/ketanshah66)\
**Post date:** [May 31, 2023, 3:05pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/5 "2023-05-31T15:05:23Z")

</div>

Hi Julius,

Thanks for your suggestions.

1. I noticed that Builder is using the Slicker library, but I couldn’t find the options to change some of the settings like enabling centerMode, initialSlide, etc. under the Layout tab. Actually I want to have the following settings:  
$(“.center”).slick({  
dots: true,  
infinite: true,  
centerMode: true,  
slidesToShow: 1,  
slidesToScroll: 1,  
initialSlide: 1

});

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [June 1, 2023, 3:57pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/6 "2023-06-01T15:57:50Z")

</div>

Hi @ketanshah66

I believe the infinite, centerMode, slidesToShow, slidesToScroll, and initialSlide are default to those you’ve selected.

However, if you do wish to customize further, would you be able to by selected the carousel in the layers tab, and clicking on edit. If you’re not seeing the options you’d like to customize, in the initial menu, there is also the Advanced Options at the bottom of the initial menu. I was able to locate the `infinite` option there.  
 ![4899566A-14C7-4560-8C2A-C26603B392C7](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/a/aee4a53162ac498ea7d234b36b0516dc261763fd.jpeg)

Please let me know if there is a customization option you’re not seeing, I would be happy to try and find another solution.

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [June 5, 2023, 5:37pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/7 "2023-06-05T17:37:13Z")

</div>

Hello @ketanshah66,

I just wanted to follow up with you and see which solution you ended up using or if I can continue exploring more options.

---

<div class="post-metadata">

**Author:** ![ketanshah66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/ketanshah66/32/2554_2.png) [@ketanshah66](https://forum.builder.io/u/ketanshah66)\
**Post date:** [June 7, 2023, 12:07pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/8 "2023-06-07T12:07:32Z")

</div>

Hi Julius,

Sorry for the late reply. I got busy with some other project.

I saw the carousel settings, but they are very few. I cannot find the Centermode option (it is not there as default), slidetoscroll, slidetoshow, initialslide, etc. Basically all these options are related to the Centermode view.

![image.png](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/4/425e67ae2d8929d25fe196874fe219bfcf20ff55.png)

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [June 7, 2023, 5:35pm UTC](https://forum.builder.io/t/javascript-plugin-does-not-work-in-custom-code/3647/9 "2023-06-07T17:35:30Z")

</div>

Hello @ketanshah66

I believe I have a solution. If you right click on the Builder Carousel Component and select JSON view, you should be able to see and edit the options you’re looking for:

![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/0/09f656e884ffffedb714ba2c6952b69877650492.png)

Please let me know if you’re unable to view.
