Show (print) featured image all dimensions (height, width)

Add this function to your functions.php file: function show($size = NULL) { global $post; $post_thumbnail_id = get_post_thumbnail_id( $post->ID ); if(isset($size)){ $image_data_array = wp_get_attachment_image_src($post_thumbnail_id,$size); }else{ $image_data_array = wp_get_attachment_image_src($post_thumbnail_id);//Default value: ‘thumbnail’ } echo $image_data_array[1].”x”.$image_data_array[2];//here you can add more chars of strings if you want } and use it like this: <a class=”classname” href=”https://wordpress.stackexchange.com/questions/256604/<?php the_post_thumbnail_url(“full’ ); ?>”>Full Image … Read more

How to remove text and retain in caption image using the_content function

If you are trying to remove the text i think the below code is what is adding this /// this is where your content is being inserted <div class=”strip_first_image”> <?php $content = get_the_content();$content = preg_replace(“/<img[^>]+\>/i”, ” “, $content); $content = preg_replace(“/\[caption.*\[\/caption\]/”, ”, $content);$content = apply_filters(‘the_content’, $content);$content = str_replace(‘]]>’, ‘]]>’, $content);echo $content; ?> </div> Someone with … Read more

Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?

Sorry, what you’re looking for is not an standard WordPress feature. It might interfere with the theme, which could be built to already include a link to the featured image. That would lead to invalid html. So you’ll have to build this yourself using the admin_post_thumbnail_html hook, which allows you to add fields to the … Read more