• Hello there,

    I’m encountering several issues with a portfolio I am trying to set up in my theme. I have asked for help before but no one has answered so far. As I am more than a beginner in js (especially in WP), I have a few questions for you in order to check I’m not doing anything wrong.

    1. In my functions.php, I’ve added new scripts thanks to the function wp_enqueue_script(). To do so, I’ve added a new function rather than adding my scripts to the theme function already in place. Is that ok? I have tried to do it both way and yet it wouldn’t work anyways.

    2. I was advised, in a different forum, to add immediately after my function add_action(‘init’, ‘plutobis_scripts’);, plutobis being of course my function. But what does this add_action do? I haven’t found much information about it and it doesn’t appear after my other wp_enqueue_script() functions.

    For those who are curious to understand what I am trying to achieve (or in need to know to answer), here it is:

    I’m trying to attain this: http://tympanus.net/Tutorials/ItemSlider/
    And it gives me this: http://sdz-upload.s3.amazonaws.com/prod/upload/Screen%20Shot%202013-05-24%20at%2011.00.26%20PM.png

    I have the latest version of WP and my theme is not child. I work local with MAMP. I have incorporated my portfolio in the homepage with a custom template.

    Thanks a lot!

    Celine

Viewing 16 replies (of 16 total)
  • Thread Starter Kalmirew

    (@kalmirew)

    I’ve made several tests. I’ve tried the slider’s code in a new php document. It was working. This is how I came to use the include function. Out of curiosity, I’ve tried pasting the code within my template again and the js was not working.

    The conclusion is as follow:
    – When this slider is directly coded within my template, my js is not working. But my other slider does load.
    – When the slider is called through an include function, it is working. But my other slider does not load.

    Very odd!

    I haven’t found out the reason my path is wrong. I’m going to try figure it out tonight.

Viewing 16 replies (of 16 total)
  • The topic ‘WordPress and js’ is closed to new replies.