Important: If you have an error or white screen after updating Elementor, please see here for the solution: http://bit.ly/2KRhmLQ

Okay
  Print

Adding JavaScript or jquery to metabox

* Skip to options B and C for shortcuts..

OPTION A

1) Install and Activate the Child theme (included in themeforest zip download).

2) Create a functions.php file and save it in the child theme folder.

3) add the following to it: (This already may be included in your child theme functions.php)

<?php
/**
 * Bellevue Child Theme Functions File.
 */
function my_themo_footer_scripts() {
   ?>
    <script type="text/javascript">your script here.</script>
<?php
}
add_action( 'wp_footer', 'my_themo_footer_scripts' );

Then add the following code where you want the html to appear.

<div class="">Add your code</div>

OPTION B

I also found that the entire script works in the content editor just not the rich text meta box. If you check 'Content Editor' in the metabox builder can you also sort where it gets displayed.

1) Add content editor to metabox builder.


2) Make sure it's set to display.

3) Sort it using the Order tab in the metabox bilder.

Option C

You may find it's easiest to use a plugin. You can include JS to appear on any specific page, or all pages.

We recommend using this great free plugin: https://wordpress.org/plugins/scripts-n-styles/


Cheers!