add bootstrap post slider with tabs

There’s probably some better way of doing this, but thought i’d give it a go anyways 🙂 – also got some of the answer from here Adding active class to first item <div class=”container”> <div id=”myCarousel” class=”carousel slide” data-ride=”carousel”> <!– Wrapper for slides –> <div class=”carousel-inner”> <?php $c = 0; $class=””; $args = array( ‘posts_per_page’ … Read more

How to track clicks

Unless you have a “religious” objection to share data with google then using GA is just the simplest and best way to go. Storing stats in your DB is a good start if you want to bring your server down when there is slightly high traffic, and in any case you can get all the … Read more

Double jQuery loaded

You can enqueue all your scripts the same way as you enqueue jQuery. Register and enqueue all your Javascripts like this (in your load_jquery function) wp_register_script ( ‘yourscripthandle’, //string $handle: a string to identify this script get_bloginfo( ‘template_url’ ) . ‘/js/yourcustomjs.js’, //string $src: Path of your script file array (‘jquery’ ), // array $deps = … Read more

Jquery window.send_to_editor function

It is just a little syntax error in your window.send_to_editor function: imgurl = $( ‘img’, html ).attr( ‘src’ ); should be imgurl = $( ‘img’, $( html ) ).attr( ‘src’ ); because your html variable is neither a valid DOM nor a jQuery Element. Additional Note: If you want to use the Thickbox on multiple … Read more

Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue

I don’t have the answer build on cookie, but I think this isn’t sensitive data, you can try localStorage. jQuery(document).ready(function($){ var initreferrer = document.referrer; if(initreferrer.indexOf(‘yourdomain.com’) === -1 ) { // Check if the referer is your site or not. If not( return -1 ) set the localStorage. localStorage.setItem(“mysite_referrer”, initreferrer); } }); Then you can use … Read more