• Niko LionWD

    (@nikoernestoleone)


    Hi everyone,

    I try to add wp-enqueue-script, because I need upload files of JavaScript and my page has appeared this by opening the page:
    Parse error: syntax error, unexpected T_STRING in /usr/home/newreformesbcn.com/web/wp-content/themes/appointment/functions.php on line 1.

    I am new to the world of wordpress.
    Any solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Looks like there’s a mistake in the syntax of your PHP. Can you please go to http://snippi.com/ and paste the exact code you’re trying to use into a new Snippi then link it here? I will look at it and see if I can point out the error.

    Thread Starter Niko LionWD

    (@nikoernestoleone)

    Hi Sean,

    Thank you for answering me.

    I try to upload a files js, but now I try to upload file js, name: progress-slideshow.js . So, I don’t know how to insert a file javascript into functions.php.

    I leave here a snippi.
    http://snippi.com/s/j7x43mm

    If not correct, so how I can to insert js into functions.php? To run a file of Javascript?

    I would greatly appreciate.

    Thanks

    Sorry for the delay here. One thing I am noticing is that at the end of your wp_enqueue_script line at the bottom of the file, you did not use a semicolon.

    wp_enqueue_script( 'progress-slideshow', get_stylesheet_directory_uri() . '/js/progress-slideshow.js' )

    should be

    wp_enqueue_script( 'progress-slideshow', get_stylesheet_directory_uri() . '/js/progress-slideshow.js' );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Try to upload files of Javascript (WP_ENQUEUE_SCRIPT) into functions.php’ is closed to new replies.