AndreyPutilov
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: get_posts() pulling incorrect dataHi. I have had absolutely the same problem. There were three lines outputting the_date, the_title and the_excerpt in the same loop, and they printed data from different posts.
Also notice that I used WP_USE_THEMES as false, I had my own loop with get_posts command. But I had setup_postdata correctly.The solution was simple. I didn
t declare $post as global. So. dont forget, this is important.Forum: Fixing WordPress
In reply to: is_404() is true and have_posts() is also true?!Ok, this is a very strange behaviour but I am not looking forward to dealing with it cause a creation of 404.php file is an acceptable solution.
In any case I want to thank esmi and all the rest because it helped me to sort out what is running in a wrong way and what is not.
Forum: Fixing WordPress
In reply to: is_404() is true and have_posts() is also true?!No, it is not my problem. Look, I have created a clean index.php file with this code
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
The result is http://www.peeep.us/7b74626d
Forum: Fixing WordPress
In reply to: is_404() is true and have_posts() is also true?!shurely it does, it outputs a list of all new posts. It is not equal to the previous query
Forum: Fixing WordPress
In reply to: is_404() is true and have_posts() is also true?!Ok, I have created a 404.php file, and it solved my problem, but I am still interested, why have_posts returns true.
Why the first case mysite.com/meaninglesstext produces a query, but another case mysite.com/category/invalidpostname does not.