<a href="<?php the_permalink(); ?>">
<?php
$img = get_attached_media('image', $post->ID);
if ($img) {
foreach ($img as $id => $attachment) {
$thumb = wp_get_attachment_image_src($id, 'thumbnail') ?>
<img src="<?php echo $thumb[0]; ?>" alt="<?php the_title(); ?>">
<?php } }?>
</a>
<div class="container">
[file]
<p>файлы сюда</p>
</div>
.container {
position:relative;
}
input {
position: absolute;
top:0; right:0; bottom:0; left;0;
opacity:0;
}
$('form input[type="file"]').change(function () {
$('.container p').html(this.files.length);
});
<input type="checkbox" name="first" id="f1" />
<input type="checkbox" name="second" class="ch" disabled />
<input type="checkbox" name="second" class="ch" disabled />
$("#f1").change(function() {
if ($("#f1").prop('checked')) {
$(".ch").prop("disabled", false);
}
else {
$(".ch").prop("disabled", true);
}
});