Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Blog width
New Landing › How can we help? › Themeforest Theme Support › Dante › Blog width
- This topic has 5 replies, 3 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Dante
-
March 12, 2014 at 6:51 pm #57069
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
March 12, 2014 at 6:55 pm #57071Disabling “show_blog_aux” gets the sidebar back into its correct position, but I’m still left with what you see attached.
March 13, 2014 at 11:17 am #57231Hi,
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 IdeasMarch 13, 2014 at 2:06 pm #57319Hi 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.
March 13, 2014 at 2:13 pm #57321Hi,
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 IdeasMarch 13, 2014 at 2:19 pm #57322Hi
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
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.