Skip to main content

add masnory view to photos

<script src="https://masonry.desandro.com/v2/jquery.masonry.min.js"></script>

<div class="video-collection">
       <div class="video-box">
                  <img src="abc.jpg">
       <div>
</div>

<style>
.video-collection .video-box {
    width: 234px;
    float: left;
    border: 1px solid #ccc;
    margin: 1%;
}
</style>

<script>
jQuery(document).ready(function($){
    var container = $('.video-collection');
    container.imagesLoaded( function(){
          container.masonry({
            itemSelector : '.video-box'
          });
    });
});
</script>

Comments

Popular posts from this blog

add custom post type

/**  *  * add custom post type  *  */ function my_custom_post_product() {   $labels = array(     'name'               => _x( 'Products', 'post type general name' ),     'singular_name'      => _x( 'Product', 'post type singular name' ),     'add_new'            => _x( 'Add New', 'book' ),     'add_new_item'       => __( 'Add New Product' ),     'edit_item'          => __( 'Edit Product' ),     'new_item'           => __( 'New Product' ),     'all_items'          => __( 'All Products' ),     'vi...

Toolset conditional

[wpv- if evaluate= "'[wpv-current-user info='id']' = '[wpv-post-author format='meta' meta='ID']' OR '[wpv-current-user info='role']' = 'administrator'" ]      //the content you want to hide goes here [/wpv- if ]