Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #57069
    Brentnauer
    Member
    Post count: 65

    Hi there,

    What is the correct way to adjust the width of the blog element in the page builder? There is no GUI way to reduce the width of the blog block, and editing the shortcode to the following appears to break the layout:

    [blog show_blog_aux="yes" blog_type="standard" masonry_effect_type="effect-1" item_count="5" category="All" offset="0" posts_order="DESC" show_title="yes" show_excerpt="yes" show_details="yes" excerpt_length="20" content_output="excerpt" show_read_more="yes" pagination="infinite-scroll" width="3/4" el_position="first last"]

    ^^ I’m trying to get a 3/4 width blog here.

    Attached is my page layout and is what I’m trying to achieve.

    Thanks

    #57071
    Brentnauer
    Member
    Post count: 65

    Disabling “show_blog_aux” gets the sidebar back into its correct position, but I’m still left with what you see attached.

    #57231
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Blog masonry layout always use full width of page so dont have option to resize its width like others elements and you resize it through hard code edit .Its reason to error . So please use full width Blog .
    Thanks 🙂
    With Best Regards
    Swift Ideas

    #57319
    Brentnauer
    Member
    Post count: 65

    Hi there,

    Is there no workaround for this? Using a sidebar on the page via the page’s options works correctly, but not when the sidebar widget is used. Seems like there should be SOME option to make this work.

    #57321
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I’m afraid it’s not built into the theme and need to modified especially for you. We always ready to help you with this customization but we are only able to provide support for basic theme issues and bug fixes. We do provide support for small customizations but unfortunately this request is beyond that. Please see our general policy and guidelines for more info. You could also hire a developer to help you with your customizations.

    Thank you for understanding!
    With Best Regards
    Swift Ideas

    #57322
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    If you are using a child theme then you can do this, you need to add this to your functions.php file:

    if (!function_exists('sf_blog_items')) {
    		function sf_blog_items($blog_type, $masonry_effect_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $item_count, $category, $exclude_categories, $pagination, $sidebar_config, $width, $offset, $posts_order) {
    		
    			$blog_items_output = "";
    			
    			$options = get_option('sf_dante_options');
    			$filter_wrap_bg = $options['filter_wrap_bg'];
    			
    			global $sf_sidebar_config;
    			$sf_sidebar_config = $sidebar_config;
    			
    			/* CATEGORY SLUG MODIFICATION
    			================================================== */ 
    			if ($category == "All") {$category = "all";}
    			if ($category == "all") {$category = '';}
    			$category_slug = str_replace('_', '-', $category);
    			
    			
    			/* BLOG QUERY SETUP
    			================================================== */ 
    			global $post, $wp_query;
    			
    			if ( get_query_var('paged') ) {
    			$paged = get_query_var('paged');
    			} elseif ( get_query_var('page') ) {
    			$paged = get_query_var('page');
    			} else {
    			$paged = 1;
    			}
    			    		
    			$blog_args = array(
    				'post_type' => 'post',
    				'post_status' => 'publish',
    				'paged' => $paged,
    				'category_name' => $category_slug,
    				'posts_per_page' => $item_count,
    				'cat' => '"'.$exclude_categories.'"',
    				'offset' => $offset,
    				'order' => $posts_order
    				);
    				    		
    			$blog_items = new WP_Query( $blog_args );
    			
    			
    			/* LIST CLASS CONFIG
    			================================================== */ 
    			$list_class = $wrap_class = '';
    			if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
    			$list_class .= 'masonry-items first-load grid '.$masonry_effect_type;
    			} else if ($blog_type == "mini") {
    			$list_class .= 'mini-items';
    			} else {
    			$list_class .= 'standard-items';
    			if ($sidebar_config == "no-sidebars") {
    				$wrap_class .= 'col-sm-12';
    			}
    			}
    			
    			
    			/* BLOG ITEMS OUTPUT
    			================================================== */ 
    			$blog_items_output .= '<div class="blog-items-wrap blog-'.$blog_type.' '.$wrap_class.'">';
    			if ($blog_type == "standard") {
    				$blog_items_output .= '<div class="timeline"></div>';
    			}
    			if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
    			$blog_items_output .= '<ul class="blog-items row '. $list_class .' clearfix" id="blogGrid">';
    			} else {
    			$blog_items_output .= '<ul class="blog-items row '. $list_class .' clearfix">';		
    			}
    			
    			while ( $blog_items->have_posts() ) : $blog_items->the_post();
    				    				
    				$post_format = get_post_format($post->ID);
    				if ( $post_format == "" ) {
    					$post_format = 'standard';
    				} 
    				
    				if ($blog_type == "mini") {
    					$item_class = "col-sm-12";
    				} else if ($blog_type == "masonry") {
    					if ($sidebar_config == "both-sidebars") {
    					$item_class = "col-sm-3";
    					} else {
    					$item_class = "col-sm-4";
    					}
    				} else if ($blog_type == "masonry-fw") { 
    					$item_class = "col-sm-3";
    				} else {
    					$item_class = $width;
    				}
    				
    				
    				/* BLOG ITEM OUTPUT
    				================================================== */ 
    				$blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" class="blog-item '.$item_class.' format-'.$post_format.' '.implode(' ',get_post_class()).'" id="'.get_the_ID().'">';
    				$blog_items_output .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more);
    				$blog_items_output .= '</li>';
    				
    				
    			endwhile;
    			
    			wp_reset_postdata();
    			
    			$blog_items_output .= '</ul>';
    			
    				
    			/* PAGINATION OUTPUT
    			================================================== */ 
    			if ($pagination == "infinite-scroll") {
    				
    				global $sf_include_infscroll;
    				$sf_include_infscroll = true;	
    				
    				$blog_items_output .= '<div class="pagination-wrap hidden">';
    				$blog_items_output .= pagenavi($blog_items);									
    				$blog_items_output .= '</div>';
    				
    			} else if ($pagination == "load-more") {
    				
    				global $sf_include_infscroll;
    				$sf_include_infscroll = true;	
    				
    				$blog_items_output .= '<a href="#" class="load-more-btn">'.__('Load More', 'swiftframework').'</a>';
    				
    				$blog_items_output .= '<div class="pagination-wrap load-more hidden">';
    				$blog_items_output .= pagenavi($blog_items);									
    				$blog_items_output .= '</div>';
    				
    			} else if ($pagination == "standard") {
    				if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
    				$blog_items_output .= '<div class="pagination-wrap masonry-pagination">';
    				} else {
    				$blog_items_output .= '<div class="pagination-wrap">';
    				}
    				$blog_items_output .= pagenavi($blog_items);									
    				$blog_items_output .= '</div>';
    			}
    			
    			
    			$blog_items_output .= '</div>';
    			
    			
    			/* FUNCTION OUTPUT
    			================================================== */
    			return $blog_items_output;
    			
    		}
    	}

    Let me know if this works

    – Kyle

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register