How can I display 'Hard Cropped' image on the Index page?
-
Hi. Thank you for your theme development.
1.
I’ve tried to display hard cropped image on index page…all day.
I used
add_image_size( 'display-image', 150, 150, true );
and changed in index.php like following:
if( wp_is_mobile() ) { $postimg = 'display-image'; } else { $postimg = 'display-image'; }
result was.. it didn’t work.
and the image size only changes based on your style.css’s width part .. I think
#post-entry div.post-thumb.in-archive
I’ve tried similar ways to get hard cropped image.. but I never got hard cropped..a perfect square sized images.
2.
dez_get_featured_post_image
has $width,$height
but when i changed these parameters, Its img size never changed..
ex) 300, 300 → 150, 150 in index.php
why do we have these parameters? I’m curious..
Like I said before, displaying image size is based on style.css.
These two parameter doesn’t effect to displaying image size.(I think)I’m a web programming newbie. would you help me?
🙂
- The topic ‘How can I display 'Hard Cropped' image on the Index page?’ is closed to new replies.