Vlad Nicula
Forum Replies Created
-
Thanks for the page vs paged hint. I found it out on my own and didn’t know why it happened.
To explain what I did with the 404 problem.
On my 404.php I had something like
if(/* see if paged var exists, and some other condition indicating that I have a cusotm taxonomy present*/) : redirect to taxonomy template; else : do 404; endif;
This works in some very few cases, but hey 🙂 it fixed it for me. It’s a small site anyway.
I make a patch for it. On my 404.php template I check to see if paged and taxonomy variables are set in get_query_vars. If true, I include the taxonomy-mytaxonomyname.php instead of the rest of the 404 page.
Not the best, but it works… There are so many reasons this is not a good move, but hey, I think they will fix this soon.
I tried with a new installation and it still doesn’t work. http://webcodetuts.com/lesobjects.ro/?taxonomy=lobj_product_category&term=handmade
Why is this happening ONLY on my host, and not on my localhost? 😐
Thanks for your replay scribu, I thought about it and I can’t seem to find out why this happens. I will try to use the theme on a fresh wordpress installation and see how that works.
There were some other problems with wordpress 3.1. For example, my custom post type name had uppercase letters. I must have skipped the line from the codex page that said we should not use uppercase letters.
Now all the old products have the post_type = “LOBJ_Product” and the new ones have post_type = “lobj_product”. Luckily I was able to fix this with a simple SQL Update wp_posts SET post_type = “lobj_product” where post_type = “LOBJ_Product” but anyway, quite a bad move they did with 3.1…
Forum: Fixing WordPress
In reply to: Loops and WP PageNavi Plugin problemsHi,
I’m not sure if this still needs attention but I know a solution.
WordPress uses a variable named paged to know on what page the query is made. If we are on the second page of an iteration of posts, then paged will be set to 1(maybe 2, depending if the pages are 0 based or not).
By default, the URL for a second page of iteration would look like this: http://www.example.com/paged=X where X is the page number.
This variable can be set into query posts or WP_Query. Simply adding paged=get_query_vars(“paged”) will solve the problem.
Example
query_posts('posts_per_page=10&cat=-80&paged='.get_query_vars("paged"));