thorwik
Forum Replies Created
-
Unfortunately there are no JavaScript errors and I don’t have access to the PHP logs. I’ve tried disabling other plugins without luck. We are running WordPress version 3.2.1.
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsI found it!
The correct way to restrict the category universally in 3.1.1 is:
query_posts( 'cat=-18' );without the query_string and &.
Thanks again for pointing me in the right direction. This issue has been resolved. 🙂
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsYes, thank you for your help.
I quickly saw that I had left out the reset query at the end of the loop so I added it:
wp_reset_query();I also discovered that the problem with the article page is not that the conditionals aren’t met but that the query_posts restriction doesn’t work on the main article page for some reason while it does work on the archive pages and home page.
Either way, the query_posts doesn’t seem to break the shop page anymore so I’m once again a bit closer to my goal and just need to figure out why the query_posts category restriction doesn’t work on the article page. No kind of query_posts seem to affect that page anymore for some reason. Perhaps I could try add a bit of code that manually loads the articles when the is_page(81) conditional is met and remove the article page assignment in WordPress’ settings, or would that just be going around the bug instead of actually getting rid of it?
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsSo you’re saying the query_posts restriction should work but there is something else in the code that makes it break the conditionals? Can you think of anything in particular that has changed between 2.9.1 and 3.1.1 that could be behind it? I’ll go dump the variables as you advised and hope they’ll provide some more details about the problem.
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsOops, my bad! I have indeed used the function once to exclude a certain category from the main article page:
query_posts($query_string . '&cat=-18');If I remove it the product categories no longer redirect to the article page (yay!) but the single product page still doesn’t meet the condition for the shop sidebar and then I need to find another way to exclude category 18 from the article page.
The broken parent_page condition was also caused by that one line of code. You’re very good! If I can just find a way to exclude category 18 from the article page that doesn’t break the site I’ll be happy. The shop sidebar not showing on single product pages is a relatively small issue compared to the others and I may be able to come up with some kind of workaround to it.
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsI’m pretty sure I’ve only used WordPress’ own functions and codex and not touched the database or made any own queries.
Forum: Fixing WordPress
In reply to: Upgrade broke conditional tagsWould you care to clarify a bit? What could be causing it and what could be done to fix it? Do you need to see more of the code? The failing logic is not consistent, sometimes a is_page condition fails, sometimes a post_parent condition and sometimes everything works. It’s always the same ones that fail though.