Featured Image and Rouned corners

Community Forums Forums Design Tips and Tricks Featured Image and Rouned corners

This topic is: resolved

This topic contains 10 replies, has 2 voices, and was last updated by  realestateradio 7 months, 3 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #102907

    realestateradio
    Member
    Post count: 29

    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/
    #102909

    Lauren @ OnceCoupled
    Member
    Post count: 643
    .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


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #102918

    realestateradio
    Member
    Post count: 29

    Ok, 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,

    #102921

    Lauren @ OnceCoupled
    Member
    Post count: 643

    I’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. :)


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #102927

    realestateradio
    Member
    Post count: 29

    Hi I am using functions.php. tpo move image into post area

    not sure how to apply class post-image like you mentioned.

    Thanks

    #102933

    realestateradio
    Member
    Post count: 29

    also the images are thumbnails

    #102936

    Lauren @ OnceCoupled
    Member
    Post count: 643

    Can 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 );
    		}

    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #102942

    realestateradio
    Member
    Post count: 29

    This 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 );

    #102943

    realestateradio
    Member
    Post count: 29

    p.s a big thank you you for taking the time

    #102948

    Lauren @ OnceCoupled
    Member
    Post count: 643

    Try ‘class’ => ‘alignright post-image’.


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #102950

    realestateradio
    Member
    Post count: 29

    you lost me, where would I put it ?

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

You must be logged in to reply to this topic.