A
A
Anton Gulin2019-02-09 12:45:51
JavaScript
Anton Gulin, 2019-02-09 12:45:51

How to embed Web CallBack Form FreePBX in WordPress?

Hello.
There is such a module in FreePBX - Web CallBack https://wiki.freepbx.org/display/FPG/Web+CallBack - allows you to place a callback form on sites.
By default, this is done through an iframe, but it is also possible to modernize the form and insert it as html code https://wiki.freepbx.org/display/FPG/Customizing+t...
but this option causes problems on the site on CMS WordPress - site layout partially breaks due to

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
, which is present in the Web CallBack code, and without it, the form does not work, although the WordPress page code contains
<script type='text/javascript' src='/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
<script type='text/javascript' src='/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script>


I tried several WordPress templates - the result is the same
What to do with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Gulin, 2019-12-26
@snaggy

In the functions.php file of the template, you need to insert this code

function my_scripts_method() {
  wp_deregister_script( 'jquery-core' );
  wp_register_script( 'jquery-core', '//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js');
  wp_enqueue_script( 'jquery' );
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question