Hi! I´m having a little problem with my wordpress theme. I want to use query_posts on my theme, but when I add query_posts before the loop, than the page gets all white and everuthing on the page disappears. Everything else works just fine on the theme before i add the query_posts.
How do i solve this problem ?
Here is my code :
Nobody ?
- Author was Featured
- Bought between 1 and 9 items
- Europe
- Exclusive Author
- Has been a member for 4-5 years
- Interviewed on the Envato Notes blog
- Referred between 200 and 499 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Try having the ‘if have posts’ first then ‘query posts’ then ‘while have posts’ and be careful with how you end your loop.
So you’ll have:
if..
query..
while...
endwhile...
else..
endif
hope that makes sense
Try having the ‘if have posts’ first then ‘query posts’ then ‘while have posts’ and be careful with how you end your loop.So you’ll have:
if..
query..while...endwhile...else..
endif
hope that makes sense
Still not working….
When you use query_posts it affects the loops that come after it. You need to preserve the original loop if you still want to use it. Look up info about rewind_posts(), that should help…
Still not working, i will pay the one who helps me solve the problem.
Oh, I read that wrong. I thought you meant the query_posts was working but ruining the rest of the page.
Here is the exact snippet from my template that shows how I do it. I don’t have time to troubleshoot your code, but if you compare it to this you should be able to find the problem:
(it looks like you dont both need IF have post and WHILE have posts)
The end of your code looks unusual:
<? endelse <?php endif ; ?>
First, you don’t have a closing php code after “endelse”.
Second, i have issues with php code if i use ”<?” instead of ”<?php”. Try using ”<?php” before the endelse.
I charge $1000.00 per incident! 
It´s not working. Is there anybode that can help me ? That can take a look in my files ? I will pay 10 $.
Anyone ? I will pay.
