Title: Implement Codepen slider code
Last modified: April 24, 2025

---

# Implement Codepen slider code

 *  [timothy12](https://wordpress.org/support/users/timothy12/)
 * (@timothy12)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/)
 * I’ve found [this code snippet](https://codepen.io/yudizsolutions/pen/rNqGamj)
   on Codepen. For instance, I wanted to implement the entire code into my website.
   Later I will decide what slider I wanted to use. The next step will be inserting
   WP Post content in it.
   But back to the start. I’ve copied the code snippets. 
   The CSS is in my elements.css. The content of the external css-files is also 
   in it. The JS-links are in the header and the html is inserted too (pink area
   on the site _[ redundant link deleted ]_). But for some reason, it’s not working
   yet and I can’t figure out what is causing the problem.I hope another pair of
   eyes can help solving the issue.Kind regards,Timothy
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimplement-codepen-slider-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Rolly Bueno](https://wordpress.org/support/users/rollybueno/)
 * (@rollybueno)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/#post-18433187)
 * Hey there,
 * I checked your site and you have: `$ is not defined` error which indicates that
   some of your script calls to jQuery before initialising it or a script conflict.
   This might be preventing your slider from working.
 * Make sure you add jquery to your deps param when enqueuing your custom script.
   You can check the documentation for more info in – [https://developer.wordpress.org/reference/functions/wp_enqueue_script/](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
 * Cheers!
 *  Thread Starter [timothy12](https://wordpress.org/support/users/timothy12/)
 * (@timothy12)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/#post-18433225)
 * Hi!
 * [@rollybueno](https://wordpress.org/support/users/rollybueno/) Thanks for your
   quick reply. I’ve looked at the page you suggested. I’m not well known with JS,
   but do I have to add the colored code at the top of the page mentionned into 
   my site (somewhere)?
 * Regards, Timothy
 *  Thread Starter [timothy12](https://wordpress.org/support/users/timothy12/)
 * (@timothy12)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/#post-18433801)
 * Hi again,
   I guess I’ve found the issue. I was adding a js-file in the header.
   php of the website. I’ve replace that link with the next code in the functions.
   php.
 * `wp_enqueue_script( 'deelmobiliteit-mobility-option-slider', get_template_directory_uri().'/
   js/mobility-option-slider.js', array(), '20151215', true );`
 * It seems to work now!
 *  Thread Starter [timothy12](https://wordpress.org/support/users/timothy12/)
 * (@timothy12)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/#post-18434327)
 * I was wondering how I could outline the slides so you don’t see the parts of 
   the previous and next slides.
 * Kind regards,
   Timothy
    -  This reply was modified 1 year, 1 month ago by [timothy12](https://wordpress.org/support/users/timothy12/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Implement Codepen slider code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [timothy12](https://wordpress.org/support/users/timothy12/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/implement-codepen-slider-code/#post-18434327)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
