Change header image loaded by jQuery to use HTTPS

Have you considered Protocol Rewriting? The code below will convert all http: and https: to // for each script, link, base, and image. Place this in your functions.php: add_action( ‘plugins_loaded’, ‘wpse_232287_init’ ); function wpse_232287_init() { // Initiate the function ob_start( ‘wpse_232287_remove_http’ ); } function wpse_232287_remove_http( $buffer ) { // Check for a Content-Type header, only … Read more

WP Media uploader loading only once in options page

The reason for the media uploader not opening when clicking the second button is that both of your buttons have the same ID, which you are also binding to the function that open your uploader. Element IDs should always be unique, hence the .click function listener will only detect when user clicks the first button … Read more

Can’t move jQuery to footer

Not the best way but removing the default WordPress actions that allow any scripts in the document’s head can help: function md_footer_enqueue_scripts() { remove_action(‘wp_head’, ‘wp_print_scripts’); remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9); remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1); } add_action(‘wp_enqueue_scripts’, ‘md_footer_enqueue_scripts’);`

validate a metabox based on the category that is selected

Apologies for the delay – what I did was basically created a .js file and places it within my theme folder – for example themes/nameoftheme/custom/checkcode.js Then using jquery – I created my code – here’s a snippet: jQuery(‘#in-category-6’).click(function(){ jQuery(‘#metabox_one’).toggle(this.checked); jQuery(‘#metabox_two’).hide(); jQuery(‘#metabox_three’).hide(); jQuery(‘#in-category-3’).attr(‘checked’, this.checked); jQuery(‘#in-category-1’).attr(‘checked’, false); jQuery(‘#in-category-4’).attr(‘checked’, false); jQuery(‘#in-category-5’).attr(‘checked’, false); jQuery(‘#in-category-7’).attr(‘checked’, false); jQuery(‘#in-category-8’).attr(‘checked’, false); jQuery(‘#in-category-9’).attr(‘checked’, false) … Read more

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