Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featured Image and Rouned corners
Tagged: featured image rounded corners
- This topic has 10 replies, 2 voices, and was last updated 9 years, 11 months ago by realestateradio.
-
AuthorPosts
-
April 29, 2014 at 9:07 am #102907realestateradioMember
Morning,
I thought this would have already been done but my searched don't show as much.
I would like for featured image to have a 10px rounded corners for home page post, singular post page and archive pic
Im using eleven40 pro and my featured images in all of the above are thumbnail
sample page: http://realestateradio.tv/category/agents/
http://realestateradio.tv/category/agents/April 29, 2014 at 9:19 am #102909Lauren @ OnceCoupledMember.post-image { border-radius: 10px; }
This will apply it to featured images but not inserted images. To add cross browser compatibility, search "CSS border-radius" for the different variations. 🙂
Best,
Lauren
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 29, 2014 at 9:43 am #102918realestateradioMemberOk, that explains why im having trouble, I have moved the featured images into content area
is that an easy fix to round the images in content area. ?
http://realestateradio.tv/category/agents/and Thank you,
April 29, 2014 at 9:55 am #102921Lauren @ OnceCoupledMemberI'm not sure how you're inserting the images into your content. Using your functions file, or using your editor? If you apply the class post-image to those images, they'll automatically be styled as well. 🙂
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 29, 2014 at 10:01 am #102927realestateradioMemberHi I am using functions.php. tpo move image into post area
not sure how to apply class post-image like you mentioned.
Thanks
April 29, 2014 at 10:10 am #102933realestateradioMemberalso the images are thumbnails
April 29, 2014 at 10:19 am #102936Lauren @ OnceCoupledMemberCan you show the code you're using? For instance, to insert my images I'm using:
$img = genesis_get_image( array( 'format' => 'html', 'size' => 'full-feature', 'context' => 'archive', 'attr' => genesis_parse_attr( 'entry-image' ), ) ); if ( ! empty( $img ) ) printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); }
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 29, 2014 at 10:44 am #102942realestateradioMemberThis is all related code, to the best of my knowledge.
//*---------------------add image in singular post------------------------
add_action( 'genesis_entry_content', 'sk_show_featured_image_single_posts', 9 );
function sk_show_featured_image_single_posts() {
if ( ! is_singular( 'post' ) ) {
return;}
$image_args = array(
'size' => 'single-post-thumbnail',
'attr' => array(
'class' => 'alignright',
),
);genesis_image( $image_args );
}
//*------------------Featured Image From Left to Right---------------------
function sk_change_image_alignment( $attributes ) {$attributes['class'] = str_replace( 'alignleft', 'alignright', $attributes['class'] );
return $attributes;}
add_filter( 'genesis_attr_entry-image', 'sk_change_image_alignment' );//*----------------------------------------------------------------------------------------
//* Add new featured image size
add_image_size( 'grid-featured', 150, 150, TRUE );/** Add new image sizes */
add_image_size( 'post-image', 150, 150, TRUE );add_image_size( 'single-post-thumbnail', 150, 150, true );
April 29, 2014 at 10:45 am #102943realestateradioMemberp.s a big thank you you for taking the time
April 29, 2014 at 11:10 am #102948Lauren @ OnceCoupledMemberTry ‘class’ => ‘alignright post-image’.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 29, 2014 at 11:25 am #102950realestateradioMemberyou lost me, where would I put it ?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.