Show Featured Image Dimensions and size frontend with shortcode

Yes, that is possible. Building upon the answer Nicolai Grossherr gave to Get the size (size in Kb or MB) of an featured image? you could do something like this, // e.g. in functions.php add_shortcode( ‘my_image_metadata’, ‘my_image_metadata_callback’ ); function my_image_metadata_callback($atts) { $img_meta = wp_get_attachment_metadata( get_post_thumbnail_id() ); if ( ! $img_meta ) { return; } $upload_dir … Read more

Contact Form 7 WordPress, checking a few fields, if empty then invalid

I solved my problem add_filter(‘wpcf7_validate_text’, ‘or_input_validation_filter’, 20, 2); function or_input_validation_filter($result, $tag) { if (‘your-link’ == $tag->name) { $your_link = isset($_POST[‘your-link’]) ? trim($_POST[‘your-link’]) : ”; $your_file = (!empty($_FILES[“file-image”][“name”])) ? trim($_FILES[‘file-image’][‘name’]) : ”; if($your_link == ” && $your_file == ”) { $result->invalidate($tag, “One of the fields has not been completed?”); } } return $result; }