Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #262336

    Hi, don’t know if that’s all correct and if you’re ok with publishing secrets but I did some code that answers a popular feature request : masonry blog not full size (with or without sidebar) within blog. you can view it here and nice guys can help me finding out bugs if any :

    http://www.cadiou-industrie.com/actualites-portails-clotures-aluminium-pvc

    or here

    http://poleouest.com/2013/

    the solution is to replace the code in archive.php at line 34 approx :

      if($blog_layout == 'blog-grid')
                        {
                            global $posts;
                            //query_posts( array('posts_per_page'=>'-1') );
                            $post_ids = array();
                            foreach($posts as $post) $post_ids[] = $post->ID;
                              //  echo count($posts);
                            if(!empty($post_ids))
                            {
    
                           $atts_query   = array(
                                    'type' => 'grid',
                                    'items' => get_option('posts_per_page'),
                                    'columns' => 3,
                                    'class' => 'avia-builder-el-no-sibling',
                                    'paginate' => 'yes',
                                    'use_main_query_pagination' => 'yes',
                                 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types()) 
                                 // 'ids' =>   $post_ids   
                                );
                              
                $atts['container_class'] = "av-masonry-gallery";
                $atts['caption_elements'] = "title";
                $atts['caption_display'] = "on-hover";
                $atts['gap'] = "large";
                $atts['overlay_fx'] = "active";
                $atts['size'] = "flex";
                                $masonry  = new avia_masonry($atts);
                        //        print_r($atts);
                    // $masonry->extract_terms();
                    //  echo "a";print_r($post_ids);
                    $masonry->query_entries (  $atts_query );
                    $masonry_html = $masonry->html();
                    echo $masonry_html;
    
                            }
                            else
                            {
                                get_template_part( 'includes/loop', 'index' );
                            }
                        }
    #262526

    Hi!

    The tooltips need additional tweaking but it’s a start, thanks for sharing it :)

    Regards,
    Josue

    #262658

    Looks great!

    A nice option.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘masonry blog with sidebar’ is closed to new replies.