Show ‘Close’ Button in jQuery UI – Dialog Box with WP

enter image description here

I am making a dialog box using jquery ui dialog in wordpress. The problem that I am having is when the dialog box appear, the close button 'X' is not shown. example as below.

I have make some reading regarding this issue and it is due to conflict on bootstrap. Reference on Stackoverflow. How do I want to implement it on wordpress? Below are my codes on functions.php that I made

function add_my_script() {     
   if(is_page('my_custom_page')){
     //Tried to deregister bootsrap and it work fine but I need the boostrap as well. 
     //wp_deregister_script('zerif_bootstrap_script');
     //Tried to degregister and enqueue back the script to follow the rules base on reference  
     //wp_enqueue_script('zerif_bootstrap_script', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true);
     wp_enqueue_script('jquery-ui-dialog');
   }

}

add_action('wp_enqueue_scripts', 'add_my_script');

Read more here: Show ‘Close’ Button in jQuery UI – Dialog Box with WP

Leave a Reply

Your email address will not be published. Required fields are marked *