How to blur the_post_thumbnail() via blur.js (jquery)?

I figured it out. blur.js needs an background-image to work. i had to set the image as background separately: <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘full’ );?> <a href=”https://wordpress.stackexchange.com/questions/210956/<?php echo $imageLink; ?>”> <div class=”testbg” style=”background-image: url(‘<?php echo $thumb[‘0′];?>’)”> <?php the_post_thumbnail(); ?> </div> </a>

Masonry – Can’t Find Variable imagesLoaded

I discovered that by removing the footer.php file, I was removing a link to the function wp_footer(); which essentially does this: function wp_footer() { /** * Print scripts or data before the closing body tag on the front end. * * @since 1.5.1 */ do_action( ‘wp_footer’ ); }

Enqueue script, taking no effect [closed]

Try this to set the alert if you’ve scrolled 100px from the top of the page. jQuery(document).ready(function ($) { $(window).scroll(function(){ var ScrollTop = parseInt($(window).scrollTop()); if (ScrollTop > 100) { alert(“You’ve scrolled 100 pixels.”); } }); }); Here is a JSFiddle showing it in action. Assuming you want to do more than just show an alert, … Read more

File not enqueueing

I found the problem with my enqueue statements. There was a space ahead of the handle name of the wp_enqueue_scripts statements for both “tablesorterjs” and “tablesorterfunctions”. Once I removed the space in front of the handle name, the scripts enqueued. wp_register_script( ‘tablesorterjs’, plugins_url( ‘/js/jquery.tablesorter.js’, __FILE__ ), array(‘jquery’) ); wp_enqueue_script( ‘tablesorterjs’ ); wp_register_script( ‘tablesorterfunctions’, plugins_url( ‘/js/tablesorter.js’, … Read more

JQuery and Javascript to pan image

I had to overcome two issues to resolve this. The 404 error was due to the way I registered the script. It pointed to the parent theme folder, while I had saved the .js file to the child theme folder. For the moment, I’ve put a copy in the parent theme folder, and am looking … Read more

WP Media Uploader modal conflicts with Bootstrap modal

Just proxy the modal-open class for Bootstrap like this: .bs-modal-open { overflow: hidden; } .bs-modal-open .modal { overflow-x: hidden; overflow-y: auto; } // or using sass … .bs-modal-open { @extend .modal-open; } Add/remove the bs-modal-open class to the body when opening/closing a BS modal: $(‘.bs-modal’) .on(‘show.bs.modal’, function (e) { $(‘body’).addClass(‘bs-modal-open’); }) .on(‘hidden.bs.modal’, function (e) { … Read more

comment-reply.js disables any other form javascript

I found the cuplrit and has nothing to do with comment-reply.js. I was targeting my javascript based on which template and of course the javascript wasn’t loading. if( $(“body”).hasClass(“page”) ){ … Needed to add this: if( $(“body”).hasClass(“page”) || $(“body”).hasClass(“single”) ){ …

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