Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.
Hello my friend,
I read this article on how to create WordPress widgets and it was very useful. I have done all, but I need to show the thumbnail before the text. My code now is:
query_posts('posts_per_page=4&cat=13&orderby=date');
if (have_posts()) :
echo "";
while (have_posts()) : the_post();
echo "".get_the_title();
echo the_post_thumbnail($post_id, 'medium');
echo "";
endwhile;
echo "";
I have tried to change something, but my WordPress crashes and shows me a white page. Please can you help me? Thank you in advance!
2013-04-22 21:34:02
the code that i pasted here were missed up, i don't know why, anyway, I have resolve this, please delete it
2013-04-22 07:06:29
First up, I'm not sure why you're echoing "" unless the code paste messed up. Those lines are now pointless, so remove them. Second, bit difficult to tell without seeing the full code. Probably you just forgot close the php somewhere, but using pastebin to show us everything would help.