Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #86003
    iquarius
    Member
    Post count: 32

    How can i override:

    /////////////////////////////////////////////
    // MAP FUNCTIONS
    /////////////////////////////////////////////

    inside my child-theme

    #86056
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Unfortunately overriding jQuery functions isn’t something that is possible with a child theme. What exactly are you trying to do?

    – Ed

    #86641
    iquarius
    Member
    Post count: 32

    Hello Ed,

    I modified the Map Functions to add/change more colors in the rendered google map. I change the roads colors, point of interest and such. I am afraid when i update the main theme, i will loose this custom code.

    So far i have managed to to move custom PHP code to a child theme, but I don’t know how could i do this with some code inside the functions.js

    Please advise.

    #86711
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    As I said, it isn’t possible to override JS file sections in WordPress, you’d need to replace the original file reference. What you would need to do is copy the sf_enqueue_scripts() function from the main theme functions.php (line 171) – you can then modify it to point to the functions.js file in your child theme, although given the main functions.js file is updated often, I’d advise against this.

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register