Delete images of a particular size

Yap, a similar things happened to us once. And one of our senior developer and my teacher, Ms. Tahmina Akter, made the following code for us. Though it’s too rough, and there are some deprecated PHP functions too (I fixed them and updated the code), but it works. CAUTION: Handle it with PROPER CARE, because … Read more

problem with updating metabox of upload image

I have no time to write at your code, but with your help works for me function wms_add_headerimage_cb( $post ){ //campuri $values = get_post_custom( $post->ID ); $headerpageimage = isset( $values[‘headerpageimage’][0] ) ? esc_attr( $values[‘headerpageimage’][0] ) : ”; $img_src = wp_get_attachment_image_src( $headerpageimage, ‘medium’ ); wp_nonce_field( ‘allpages_meta_box’, ‘allpages_meta_box_nonce’ ); ?> <p> <img id=”headerpage_image” src=”https://wordpress.stackexchange.com/questions/182634/<?php echo $img_src[0] ?>” … Read more

How to show images uncropped after uploading?

The theme you are using crops uploaded pictures, but there is always a version of the picture which keeps the original full size. Modify the code that render the picture that it will use the size parameter. Eg: Use: wp_get_attachment_image: echo wp_get_attachment_image( $attachment->ID, ‘full’ ); Or: display post_thumbnail: echo get_the_post_thumbnail( $post->ID, ‘full’ ); ‘full’ here … Read more

Get attachment images does not return any attached images

For this feature to work the images must be uploaded to the media library from that page. In other words, clicking the “Add Media” button and adding images already in your media library won’t do it. You must click “Add Media” then “Upload Images” and add them to the page.

Url link to feature image in the portfolio [closed]

I think it is possible with custom fields. Add a custom fields, for example, named link. Put the link into the value field. Then you will be able to access it something like that: <a href=”https://wordpress.stackexchange.com/questions/187970/<?php echo get_post_meta( get_the_ID(),”link’, true ); ?>”> <?php the_post_thumbnail(); ?> </a>