Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #623084

    Hi Kriesi team,
    I am trying to add a javascript-map to one page on a website which uses the Enfold theme with a child theme. The code will run an interactive map with different business locations. I really hope you cann help me once more! I´m quite desperate by now…

    What I tried until now:
    1) Adding the code to the functions php of the child theme by using wp_register_script and wp_enqueue_script, which didn´t help. In this case I created a “js”-folder in the childtheme-folder.

    // Register Script functions.php (child)
    function map_ivt() {
    if (!is_admin()) {
    wp_register_script( ‘queueivt’, get_stylesheet_directory_uri().’queue.v1.min.js’, false, ‘1.0’, false );
    wp_enqueue_script( ‘queueivt’ );

    wp_register_script( ‘geoivt’, get_stylesheet_directory_uri().’d3.min.js’, false, ‘1.0’, false );
    wp_enqueue_script( ‘geoivt’ );

    wp_register_script( ‘ivt’, get_stylesheet_directory_uri().’ivt.js’, false, ‘1.0’, false );
    wp_enqueue_script( ‘ivt’ );
    }
    }
    add_action( ‘wp_enqueue_scripts’, ‘map_ivt’ );

    2) Adding the code directly to the page “Standortkarte” by using a codeblock and the textblock – didn´t work either.
    <script type=”text/javascript” src=”/map/js/queue.v1.min.js”></script>
    <script type=”text/javascript” src=”/map/js/d3.min.js”></script>
    <script type=”text/javascript” src=”/map/js/ivt.js”></script>

    3) Adding the code to a textblock via the plugin “Insert HTML Snippet” – didn´t work.

    Do you have an idea about where to insert this code to make it work?
    Would be greatly appreciated! :)
    Best, Claudia

    #624705

    Hey Claudia,

    Thanks for getting in touch with us!

    You are adding the code to call or reference to these js files, d3.min.js, ivt.js and queue.v1.min.js. Are the file path or url you are putting in correct and that is where the files are located?

    Best regards,
    Jordan Powell

    #626337

    Hi Jordan,

    thank you for your reply. I found another solution using iframes, which is not the best one, but it works for now!
    Thank you anyway!

    Best, Claudia

    #626898

    Hi Claudia,

    Great, glad you found a fix. Please let us know if you should need any more help on the topic.

    Regards,
    Rikard

    #752267

    Hi guys.

    I am Alfredo, not a professional in design but I love all this subject, and I dedicate a lot of time and despite that I can not insert this code

    <script id=”despegar-root-js” type=”text/javascript” src=”//www.despegar.com.pe/comunidadafiliados/widgetGenerator/widgetCore.js” data-id=”33281″ data-context-path=”//www.despegar.com.pe/comunidadafiliados”></script>

    in the page to display a search engine of flights in my web, I used avia for the design and the box of insertion of Codigo but never manages to show the page, it remains as if it never loaded,

    some idea to solve this subject, I am really interested to put this script in the homepage, to help the clients,

    Regards and thanks for your help

    #753506

    Hi @2011apuchin,

    Where did you get that code and what is it supposed to do?

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.