• Resolved dorich

    (@dorich)


    In child theme I created a functions.php file that loads scripts and style files, the code is below.
    The section that loads libraries and scripts to all pages other than admin, in other words the first two functions, works as expected.
    However, the third function, which is designed to load a script for a specific page does not load.
    It appears that my problem has to do with specifying the page condition. The rest of the code for register and enqueue works if it is placed in the general function that loads scripts for any page other than admin pages.
    I’ve researched this can can’t find any examples showing why the approach I’ve used is not working.
    I’ve swapped the page id with the name of the page but to no avail.

    Any suggestion on the source of the problem would be much appreciated.

    Thanks.
    [Code moderated as per the Forum Rules. Please use the pastebin]

    Note for the sake of brevity I removed the src’s but these have been validated and are not the source of the problem.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Loading Scripts on specific pages’ is closed to new replies.