I use this code in shortcode for show posts :
<?php
while ($wp_query->have_posts()) : $wp_query->the_post();
$imagen = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "medium");
$ruta_imagen = $imagen[0];
if ($ruta_imagen!="")
{
$ruta_img="<a href='".get_permalink($post->ID)."'><img src='".$ruta_imagen."' width='".$img_width."' height='".$img_height."' class='image_car'></a>";
}
echo $ruta_img;
endwhile;
?>
This code works perfect inside the code for create the shortcode , but the problem it´s if i use the shortcode and put active the comments for ones post or page , the form and comments no show
I don´t understand what have bada this code for no let show the comments , if i don´t use this shortcode the comments show other time and the form
Please if you can tell me which it´s the problem perfect for me
Thank´s , regards !