Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Some Questions
New Landing › How can we help? › Cardinal › Some Questions
- This topic has 8 replies, 2 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Cardinal
-
September 15, 2014 at 3:53 am #110484
Hello..
I have several questions.1- I have 2 recent post carousel blocks on my homepage each showing a different category of posts:
1A- Is there a way to remove the details of posts and the like button only for one of them?
1B- Is there a way to remove the navigation buttons under the carousel only for one of them?2- Is there a way to show the date beneath the portfolio carousel item?
3- I have a BLOG block which shows my one latest post, and then a carousel block that shows the latest 4 posts right under it. Is there a way to remove only the latest post from the carousel? So that on the homepage it does not show the latest post twice.
4- In the BLOG block (which I have used the MINI format for) I have increased the size of the image using:
.has-no-sidebar .mini-items .blog-item figure {width: 555px;}
The size if fine, but it has stretched my image, so it is not sharp. Is there a way not to stretch it and have a proper resolution?5- Is there a way to have a border or a slight shadow under the sticky header?
Thank you so much.
September 16, 2014 at 10:18 am #111107Hi
1A) Yes, you can turn details off in the options of the recent post asset
1B) Yes, add an extra class to the recent posts asset, for e.g. no-bulletsThen add this to your custom css:
.no-bullets .owl-controls { display: none; }
2) Unfortunately not sorry
3) Yes, in the options for your post carousel, there is an option for ‘offset’. Set this to 1
4) It uses a 446px wide version of your image, we make smaller version to decrease the load time of your page. If you want to increase that value you would have to add this to the functions.php file of your child them:
/* POST THUMBNAIL ================================================== */ if (!function_exists('sf_post_thumbnail')) { function sf_post_thumbnail($blog_type = "", $fullwidth = "no") { global $post, $sf_sidebar_config; $thumb_width = $thumb_height = $video_height = $gallery_size = $item_figure = ''; if ($blog_type == "mini") { if ($sf_sidebar_config == "no-sidebars") { $thumb_width = 446; $thumb_height = NULL; $video_height = 335; } else { $thumb_width = 370; $thumb_height = NULL; $video_height = 260; } $gallery_size = 'thumb-image'; } else if ($blog_type == "masonry") { if ($sf_sidebar_config == "both-sidebars" || $fullwidth == "yes") { $item_class = "col-sm-3"; } else { $item_class = "col-sm-4"; } $thumb_width = 480; $thumb_height = NULL; $video_height = 360; $gallery_size = 'thumb-image'; } else { $thumb_width = 970; $thumb_height = NULL; $video_height = 728; $gallery_size = 'blog-image'; } $thumb_type = sf_get_post_meta($post->ID, 'sf_thumbnail_type', true); $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full'); $thumb_video = sf_get_post_meta($post->ID, 'sf_thumbnail_video_url', true); $thumb_gallery = rwmb_meta( 'sf_thumbnail_gallery', 'type=image&size='.$gallery_size); $thumb_link_type = sf_get_post_meta($post->ID, 'sf_thumbnail_link_type', true); $thumb_link_url = sf_get_post_meta($post->ID, '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($post->ID, 'sf_thumbnail_link_video_url', true); $thumb_lightbox_video_url = sf_get_embed_src($thumb_lightbox_video_url); $image_id = 0; $item_link = sf_post_item_link(); foreach ($thumb_image as $detail_image) { $image_id = $detail_image['ID']; $thumb_img_url = $detail_image['url']; break; } if (!$thumb_image) { $thumb_image = get_post_thumbnail_id(); $image_id = $thumb_image; $thumb_img_url = wp_get_attachment_url( $thumb_image, 'full' ); } $item_figure .= '<figure class="animated-overlay overlay-style thumb-media-'.$thumb_type.'">'; if ($thumb_type == "video") { $video = sf_video_embed($thumb_video, $thumb_width, $video_height); $item_figure .= $video; } else if ($thumb_type == "audio") { $image = sf_aq_resize( $thumb_img_url, $thumb_width, $thumb_height, true, false); $thumbnail_id = get_post_thumbnail_id( $post->ID ); $image_alt = sf_get_post_meta($image_id, '_wp_attachment_image_alt', true); if ($image) { $item_figure .= '<img itemprop="image" src="'.$image[0].'" width="'.$image[1].'" height="'.$image[2].'" alt="'.$image_alt.'" />'; } $item_figure .= sf_audio_post($post->ID, true); } else if ($thumb_type == "sh-video") { $item_figure .= sf_sh_video_post($post->ID, $thumb_width, $video_height, true); } else if ($thumb_type == "slider") { $item_figure .= "<a ".$item_link['config']."></a>"; $item_figure .= '<div class="flexslider thumb-slider"><ul class="slides">'; foreach ( $thumb_gallery as $image ) { $item_figure .= "<li><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></li>"; } $item_figure .= '</ul></div>'; $item_figure .= '<div class="figcaption-wrap"></div>'; $item_figure .= '<figcaption><div class="thumb-info thumb-info-alt">'; $item_figure .= '<i class="'.$item_link['icon'].'"></i>'; $item_figure .= '</div></figcaption>'; } else { $thumb_img_url = apply_filters('sf_post_thumb_image_url', $thumb_img_url); if ($thumb_type == "image" && $thumb_img_url == "") { $thumb_img_url = "default"; } $image = sf_aq_resize( $thumb_img_url, $thumb_width, $thumb_height, true, false); $thumbnail_id = get_post_thumbnail_id( $post->ID ); $image_alt = sf_get_post_meta($image_id, '_wp_attachment_image_alt', true); if ($thumb_img_url != "") { if ($image) { $item_figure .= '<img itemprop="image" src="'.$image[0].'" width="'.$image[1].'" height="'.$image[2].'" alt="'.$image_alt.'" />'; } else { //$item_figure .= '<img itemprop="image" src="'.$thumb_img_url.'" alt="'.$image_alt.'" />'; } $item_figure .= '<a '.$item_link['config'].'></a>'; $item_figure .= '<div class="figcaption-wrap"></div>'; $item_figure .= '<figcaption><div class="thumb-info thumb-info-alt">'; $item_figure .= '<i class="'.$item_link['icon'].'"></i>'; $item_figure .= '</div></figcaption>'; } } $item_figure .= '</figure>'; return $item_figure; } }
and edit:
if ($blog_type == "mini") { if ($sf_sidebar_config == "no-sidebars") { $thumb_width = 446;
the value 446.
5) Yes add this to your custom css:
.sticky-header { box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); }
– Kyle
September 18, 2014 at 11:59 am #112130Dear Kyle,
Thanks a lot.All is OK, just for number 5, the shadow for the sticky header, my main slider is naked in home and also in some of my pages, so the shadow appears on them as well. Is there a way to remove that and only display it when I scroll down? Thanks.
September 18, 2014 at 12:10 pm #112136Try this:
.sticky-header.is-sticky { box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); }
– Kyle
September 18, 2014 at 12:17 pm #112145Unfortunately with this one the whole shadow will be gone.
ThanksSeptember 18, 2014 at 12:20 pm #112149Ok I solved it:
.header-wrap, .header-standard-overlay #header, .vertical-header .header-wrap #header-section, #header-section .is-sticky #header.sticky-header{
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}Thanks 🙂
September 18, 2014 at 12:20 pm #112150Apologies, it should be:
.is-sticky .sticky-header { box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); }
– Kyle
September 18, 2014 at 12:21 pm #112153Great. Thanks a lot Kyle.
September 18, 2014 at 12:23 pm #112156No problem
– Kyle
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.