js child theme files

Discussion in 'Local Business WordPress Theme' started by pratam1, Nov 2, 2013.

  1. pratam1

    pratam1 Member

    Joined:
    Apr 7, 2012
    Messages:
    41
    Likes Received:
    0
    Hi Support,

    I created a child theme out of local business theme. The child theme works but i tried to have the js files reference the child theme but everything goes blank. I moved the js files into my new theme directory and In the functions.php file, I changed the get_template_directory_uri to get_stylesheet_directory_uri. After that the slider doesnt work and the gallery doesn't work.

    Once i switch the functions.php file back, I works fine.

    Please advise.

    Thanks!
     
  2. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,


    Child theme works for files in the parent theme main directory.
    You are trying to add subdirectory (js) file. That's why it is not working.

    Please do let me know what you are trying to achieve while adding js file in the child theme.
    I will try to provide you possible solution.
     
  3. pratam1

    pratam1 Member

    Joined:
    Apr 7, 2012
    Messages:
    41
    Likes Received:
    0
    Hi,

    I am creating a child theme and I will be editing some of js filies and i placed the js folder in child directory.I was told that if I'm editing js files you want the functions.php file which is in the parent directory to reference the js files that are in the child theme directory. I changed the get_template_directory_uri to get_stylesheet_directory_uri so that its referencing the child theme js files. After that the slider doesnt work and the gallery doesn't work. I have done this with many other themes, just haven't done it with and themes that Inkthemes have created.

    Thanks!
    Please advise.
     
  4. pratam1

    pratam1 Member

    Joined:
    Apr 7, 2012
    Messages:
    41
    Likes Received:
    0
    Hi support,

    Is there a file other then functions.php that I should be changing?

    Please advise

    Thanks
     

Share This Page