Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Adjust image sizes + remove author and date
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Adjust image sizes + remove author and date
- This topic has 19 replies, 3 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Neighborhood
-
February 26, 2015 at 2:35 pm #153441
Hi there,
I adjusted the images sizes of the products (http://neighborhood.swiftideas.net/documentation/assets/images/woo-image-settings.png and plugin Regenerate thumbnails afterwards).
1. But the image on the product page is enormous. How can I adjust this?
2. Where can I adjust the image of the posts/ blog entries?
3. Where can I move the date and author of products and posts?
Thank you!
February 26, 2015 at 2:42 pm #153448Hi
Can you provide your link and be more specific as to what you’re trying to change
– Kyle
February 26, 2015 at 2:58 pm #153463This reply has been marked as private.February 26, 2015 at 3:01 pm #1534661) In the portfolio meta options set the layout to split media / content
2) Add this to your custom css:
.portfolio-details-wrap .client, .portfolio-details-wrap .date { display: none; }
3) I’m afraid not, the whole point of masonry is different size tiles, you can however choose one of the different layouts
4) These 2? http://d.pr/i/194NL/4a0T9GQ2
February 27, 2015 at 11:29 am #153751Thank you for yur quick reply Kyle.
1) In the portfolio meta options set the layout to split media / content: where can I find this? I looked below the content editor on my Portfolio Items but didn’t se it.
4) These 2? http://d.pr/i/194NL/4a0T9GQ2:
I want to make the left one the same size as the right one. Where can I do this?Thank you.
February 27, 2015 at 1:10 pm #1537821) Check your screen options to make sure you have all of the meta tabs enabled
4) The images are not the same ratio? So how do you expect to do that?
– Kyle
February 27, 2015 at 1:39 pm #153793This reply has been marked as private.February 27, 2015 at 2:05 pm #1538051) Sorry, I did not realise it was Neighborhood, you’ll have to set the ‘detail media’ to ‘none’ and add the image into your content area
2) The reason they are different sizes is the second one is small, therefore it was not run by the image resizer. You’d have to upload a small image for the thumbnail of the first one for it to not use the image resizer (which crops them)
– Kyle
February 27, 2015 at 2:28 pm #153817This reply has been marked as private.February 27, 2015 at 2:29 pm #153820Yes you could add this to your custom css:
figure.media-wrap { max-width: 500px; }
– Kyle
March 2, 2015 at 11:13 am #154302That worked for the product images, thank you.
Is there a similar code for blog posts? These are still enormous.
March 2, 2015 at 11:16 am #154303That should also work for posts, I can’t view your site to check
– Kyle
July 3, 2015 at 1:19 pm #191514Sorry, I don’t know why, but I can’t post a new topic. (Firefox & Chrome)
The link on your button “post new topic” doesn’t work:Anyway, I have another thumbnail question.
In the neighborhood theme I want to change two thumbnail sizes:
first:
swift-framework/page-builder/builder/shortcodes/post-carousel.php
line 173$image = ""; if (function_exists('aq_resize')) { $image = aq_resize( $thumb_img_url, 420, 315, true, false); }
and second:
swift-framework/sf-content-display/sf-post-formats.php
line 289$thumb_width = 970; $thumb_height = NULL; $video_height = 728;
I can change both, no problem and it works. But after the next theme update all changes are overwritten.
Is there a way to put this in the function.php of the child-theme?
July 3, 2015 at 1:56 pm #191530Hi
The first one can’t, but the second can:
/* GET POST ITEM ================================================== */ if ( !function_exists('sf_get_post_item') ) { function sf_get_post_item($postID, $blog_type, $show_title = "yes", $show_excerpt = "yes", $show_details = "yes", $excerpt_length = "20", $content_output = "excerpt", $show_read_more = "no") { $post_item = ""; $post_format = get_post_format($postID); global $sidebars; $post_format = get_post_format(); if ( $post_format == "" ) { $post_format = 'standard'; } $post_title = get_the_title(); $post_author = get_the_author_link(); $post_date = get_the_date(); $post_categories = get_the_category_list(', '); $post_comments = get_comments_number(); $post_permalink = get_permalink(); $custom_excerpt = sf_get_post_meta($postID, 'sf_custom_excerpt', true); $post_excerpt = ''; if ($content_output == "excerpt") { if ($custom_excerpt != '') { $post_excerpt = custom_excerpt($custom_excerpt, $excerpt_length); } else { if ($post_format == "quote") { $post_excerpt = get_the_content_with_formatting(); } else { $post_excerpt = excerpt($excerpt_length); } } } else { $post_excerpt = get_the_content_with_formatting(); } if ($post_format == "chat") { $post_excerpt = sf_chat_post($postID); } $post_item = $thumb_image = $thumb_width = $thumb_height = $bordered_thumb_width = $bordered_thumb_height = $video = $video_height = $bordered_video_height = $item_class = $link_config = $item_icon = ''; if ($blog_type == "mini") { if ($sidebars == "no-sidebars") { $thumb_width = 446; $thumb_height = NULL; $video_height = 335; } else { $thumb_width = 290; $thumb_height = NULL; $video_height = 218; } } else if ($blog_type == "masonry") { if ($sidebars == "both-sidebars") { $item_class = "span3"; } else { $item_class = "span4"; } $thumb_width = 480; $thumb_height = NULL; $video_height = 360; } else { if ($sidebars == "both-sidebars") { if ($show_details == "yes") { $standard_post_width = "span5"; } else { $standard_post_width = "span6"; } } else if ($sidebars == "right-sidebar" || $sidebars == "left-sidebar" || $sidebars == "one-sidebar") { if ($show_details == "yes") { $standard_post_width = "span6"; } else { $standard_post_width = "span7"; } } else { if ($show_details == "yes") { $standard_post_width = "span10"; } else { $standard_post_width = "span11"; } } $thumb_width = 970; $thumb_height = NULL; $video_height = 728; } $thumb_type = sf_get_post_meta($postID, 'sf_thumbnail_type', true); $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full'); $thumb_video = sf_get_post_meta($postID, 'sf_thumbnail_video_url', true); $thumb_gallery = rwmb_meta( 'sf_thumbnail_gallery', 'type=image&size=blog-image' ); $thumb_link_type = sf_get_post_meta($postID, 'sf_thumbnail_link_type', true); $thumb_link_url = sf_get_post_meta($postID, 'sf_thumbnail_link_url', true); $thumb_lightbox_thumb = rwmb_meta( 'sf_thumbnail_image', 'type=image&size=large' ); $thumb_lightbox_image = rwmb_meta( 'sf_thumbnail_link_image', 'type=image&size=large' ); $thumb_lightbox_video_url = sf_get_post_meta($postID, 'sf_thumbnail_link_video_url', true); foreach ($thumb_image as $detail_image) { $thumb_img_url = $detail_image['url']; break; } if (!$thumb_image) { $thumb_image = get_post_thumbnail_id(); $thumb_img_url = wp_get_attachment_url( $thumb_image, 'full' ); } $thumb_lightbox_img_url = wp_get_attachment_url( $thumb_lightbox_image, 'full' ); $item_figure = $link_config = ""; // LINK TYPE VARIABLES if ($thumb_link_type == "link_to_url") { $link_config = 'href="'.$thumb_link_url.'" class="link-to-url"'; $item_icon = "link"; } else if ($thumb_link_type == "link_to_url_nw") { $link_config = 'href="'.$thumb_link_url.'" class="link-to-url" target="_blank"'; $item_icon = "link"; } else if ($thumb_link_type == "lightbox_thumb") { $link_config = 'href="'.$thumb_img_url.'" class="lightbox" data-rel="ilightbox['.$post_ID.']"'; $item_icon = "search"; } else if ($thumb_link_type == "lightbox_image") { $lightbox_image_url = ''; foreach ($thumb_lightbox_image as $image) { $lightbox_image_url = $image['full_url']; } $link_config = 'href="'.$lightbox_image_url.'" class="lightbox" data-rel="ilightbox['.$post_ID.']"'; $item_icon = "search"; } else if ($thumb_link_type == "lightbox_video") { $link_config = 'href="'.$thumb_lightbox_video_url.'" class="lightbox" data-rel="ilightbox['.$postID.']"'; $item_icon = "facetime-video"; } else { $link_config = 'href="'.$post_permalink.'" class="link-to-post"'; $item_icon = "file-o"; } // THUMBNAIL MEDIA TYPE SETUP if ($thumb_type != "none") { $item_figure .= '<figure>'; if ($thumb_type == "video") { $video = video_embed($thumb_video, $thumb_width, $video_height); $item_figure .= $video; } else if ($thumb_type == "slider") { $item_figure .= '<div class="flexslider thumb-slider"><ul class="slides">'; foreach ( $thumb_gallery as $image ) { $item_figure .= "<li><a ".$link_config."><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a></li>"; } $item_figure .= '</ul></div>'; } else { $image = aq_resize( $thumb_img_url, $thumb_width, $thumb_height, true, false); $image_title = sf_featured_img_title(); if ($image) { $item_figure .= '<a '.$link_config.'>'; if ($blog_type != "standard") { $item_figure .= '<div class="overlay"><div class="thumb-info">'; $item_figure .= '<i class="fa-'.$item_icon.'"></i>'; $item_figure .= '</div></div>'; } $item_figure .= '<img itemprop="image" src="'.$image[0].'" width="'.$image[1].'" height="'.$image[2].'" alt="'.$image_title.'" />'; $item_figure .= '</a>'; } } $item_figure .= '</figure>'; } // MASONRY STYLING if ($blog_type == "masonry") { if ($post_format == "quote") { $post_item .= '<div class="quote-display"><i class="fa-quote-left"></i></div>'; } else { $post_item .= $item_figure; } $post_item .= '<div class="details-wrap">'; if ($show_title == "yes") { if ($post_format == "link") { $post_item .= '<h4 itemprop="name headline">'.sf_link_post($postID).'</h4>'; } else { $post_item .= '<h4 itemprop="name headline"><a href="'.$post_permalink.'">'.$post_title.'</a></h4>'; } } // POST EXCERPT if ($post_excerpt != "0" && $show_excerpt == "yes") { $post_item .= '<div class="excerpt" itemprop="description">'. $post_excerpt .'</div>'; } if ($show_read_more == "yes") { $post_item .= '<a class="read-more" href="'.$post_permalink.'">'.__("Read more", "swiftframework").'<i class="fa-angle-right"></i></a>'; } $post_item .= '</div>'; // POST DETAILS if ($show_details == "yes") { $post_item .= '<div class="post-item-details clearfix">'; $post_item .= '<span class="post-date" itemprop="datePublished">'.$post_date.'</span>'; $post_item .= '<div class="comments-likes">'; if ( comments_open() ) { $post_item .= '<a href="'.$post_permalink.'#comment-area"><i class="fa-comments"></i><span>'. $post_comments .'</span></a> '; } if (function_exists( 'lip_love_it_link' )) { $post_item .= lip_love_it_link(get_the_ID(), '<i class="fa-heart"></i>', '<i class="fa-heart"></i>', false); } $post_item .= '</div>'; $post_item .= '</div>'; } // MINI STYLING } else if ($blog_type == "mini") { $post_item .= $item_figure; $post_item .= '<div class="blog-details-wrap">'; if ($show_title == "yes") { if ($post_format == "link") { $post_item .= '<h3 itemprop="name headline">'.sf_link_post($postID).'</h3>'; } else { $post_item .= '<h3 itemprop="name headline"><a href="'.$post_permalink.'">'. $post_title .'</a></h3>'; } } if ($show_details == "yes") { $post_item .= '<div class="blog-item-details">'. sprintf(__('By <a href="%2$s">%1$s</a> on %3$s', 'swiftframework'), $post_author, get_author_posts_url(get_the_author_meta( 'ID' )), $post_date) .'</div>'; $post_item .= '<div class="comments-likes">'; if ( comments_open() ) { $post_item .= '<a href="'.$post_permalink.'#comment-area"><i class="fa-comments"></i><span>'. $post_comments .'</span></a> '; } if (function_exists( 'lip_love_it_link' )) { $post_item .= lip_love_it_link(get_the_ID(), '<i class="fa-heart"></i>', '<i class="fa-heart"></i>', false); } $post_item .= '</div>'; } if ($show_excerpt == "yes") { if ($post_format == "quote") { $post_item .= '<div class="quote-excerpt heading-font" itemprop="description">'. $post_excerpt .'</div>'; } else { $post_item .= '<div class="excerpt" itemprop="description">'. $post_excerpt .'</div>'; } } if ($show_read_more == "yes") { $post_item .= '<a class="read-more" href="'.$post_permalink.'">'.__("Read more", "swiftframework").'<i class="fa-angle-right"></i></a>'; } $post_item .= '</div>'; // STANDARD STYLING } else { $post_item .= '<div class="row">'; // open row if ($sidebars == "no-sidebars") { $post_item .= '<div class="standard-post-author span1">'; if(function_exists('get_avatar')) { $post_item .= '<div class="author-avatar"><a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'">'. get_avatar(get_the_author_meta('ID'), '164') .'</a></div>'; } $post_item .= '<span class="standard-post-author-name" itemprop="author">'.__("Posted by", "swiftframework").' '.$post_author.'</span>'; $post_item .= '</div>'; } else if ($sidebars == "right-sidebar" || $sidebars == "left-sidebar" || $sidebars == "one-sidebar") { $post_item .= '<div class="standard-post-author span1">'; if(function_exists('get_avatar')) { $post_item .= '<div class="author-avatar"><a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'">'. get_avatar(get_the_author_meta('ID'), '164') .'</a></div>'; } $post_item .= '<span class="standard-post-author-name" itemprop="author">'.__("Posted by", "swiftframework").' '.$post_author.'</span>'; $post_item .= '</div>'; } $post_item .= '<div class="standard-post-content '.$standard_post_width.'">'; // open standard-post-content if ($post_format == "quote") { $post_item .= '<div class="quote-display"><i class="fa-quote-left"></i></div>'; } else { $post_item .= $item_figure; if ($show_title) { if ($post_format == "link") { $post_item .= '<h2 itemprop="name headline">'.sf_link_post($postID).'</h2>'; } else { $post_item .= '<h2 itemprop="name headline"><a href="'.$post_permalink.'">'. $post_title .'</a></h2>'; } } } if ($show_excerpt == "yes") { if ($post_format == "quote") { $post_item .= '<div class="quote-excerpt heading-font" itemprop="description">'. $post_excerpt .'</div>'; } else { $post_item .= '<div class="excerpt" itemprop="description">'. $post_excerpt .'</div>'; } } if ($show_read_more == "yes") { $post_item .= '<a class="read-more" href="'.$post_permalink.'">'.__("Read more", "swiftframework").'<i class="fa-angle-right"></i></a>'; } $post_item .= '</div>'; // close standard-post-content if ($show_details == "yes") { $post_item .= '<div class="standard-post-details span1">'; // open standard-post-details if ($sidebars == "both-sidebars") { $post_item .= '<div class="standard-post-author">'; if(function_exists('get_avatar')) { $post_item .= '<div class="author-avatar"><a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'">'. get_avatar(get_the_author_meta('ID'), '164') .'</a></div>'; } $post_item .= '<span class="standard-post-author-name" itemprop="author">'.__("Posted by", "swiftframework").' '.$post_author.'</span>'; $post_item .= '</div>'; } $post_item .= '<span class="standard-post-date" itemprop="datePublished">'.$post_date.'</span>'; $post_item .= '<div class="comments-likes">'; if ( comments_open() ) { $post_item .= '<div class="comments-wrapper"><a href="'.$post_permalink.'#comment-area"><i class="fa-comments"></i><span>'. $post_comments .'</span></a></div>'; } if (function_exists( 'lip_love_it_link' )) { $post_item .= lip_love_it_link(get_the_ID(), '<i class="fa-heart"></i>', '<i class="fa-heart"></i>', false); } $post_item .= '</div>'; $post_item .= '</div>'; // close standard-post-details } $post_item .= '</div>'; // close row } return $post_item; } }
– Kyle
July 3, 2015 at 2:16 pm #191544unfortunately error:
Parse error: syntax error, unexpected T_IF in /wp-content/themes/neighborhood-child/functions.php on line 2
isn’t there an easier way to global overwrite?
like:`add_image_size( ‘thumb_img_url’, 400, 400, true);
add_image_size( ‘sf_thumbnail_image’, 1000, 720, true);` -
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.