How to show image before the text with the_post_thumbnail?
-
Hello my friends,
I have read and create my own widget following this article:
https://www.makeuseof.com/tag/how-to-create-wordpress-widgets/But in my custo widget it show me the text (with link) before the thumbnail
my code now is:/* Widget */ query_posts('posts_per_page=4&cat=13&orderby=date'); if (have_posts()) : echo "<ul>"; while (have_posts()) : the_post(); echo "<li><a href='".get_permalink()."'>".get_the_title(); echo the_post_thumbnail($post_id, 'medium'); echo "</a></li>"; endwhile; echo "</ul>"; endif; wp_reset_query(); echo $after_widget; }
I have try change something but it crash me wordpress, please can you help me? thank you in advance!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to show image before the text with the_post_thumbnail?’ is closed to new replies.