How to enqueue the script without hardcoded in the theme files?

//add the JS code in a variable – without <script> $script = ” jQuery(document).ready(function(){ // add your shortcode attribute and its default value to the // gallery settings list; $.extend should work as well… _.extend(wp.media.gallery.defaults, { type: ‘default_val’ }); // join default gallery settings template with yours — store in list if (!wp.media.gallery.templates) wp.media.gallery.templates = … Read more

wp_dequeue_style and wp_dequeue_script not working on server but does work on local xampp

If you want to dequeue scripts & styles for a specific page based on the slug of the page. You can get the slug in various ways and use it instead of $_SERVER[‘REQUEST_URI’]. Use if( is_page( array( ‘my_page’) instead of if(basename($_SERVER[‘REQUEST_URI’])==’my_page’) function wpse_289574_dequeue_scrips() { if(is_page( array( ‘my_page’)){ wp_dequeue_style( ‘taxonomy-image-plugin-public’ ); … } } How to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)