Jeff Kamo
Forum Replies Created
-
Okay a new problem with the above code. With the query_post done in this way, it overrides any attempt to search with additional features. So for example…
http://www.mysite.com/?s=concrete&year=1999&product=5&post_type=projects
This should return a series of all Project posts that contain “concrete”, has the taxonomy year of 1999, and is connected to product with ID 5.
Unfortunately, with the query as it is now, it only returns all projects that are connected with the product ID 5, and ignores all other filters.
Any idea how to fix it so the query includes other filters?
Thanks
Hey thanks a lot, your advice worked out. The only change I had to make was to add ‘connected_type’ to the query, and that made it work perfectly.
My final code is as follows:
<?php if ( $_GET['product-id'] ) { query_posts( array( 'post_type' => 'projects', 'connected_type' => 'products_to_projects', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'connected' => $_GET['product-id'] ) ); } ?>Thank you for you advice, I will give that a try and report back here when I’m done 🙂
Forum: Fixing WordPress
In reply to: Trouble using orderby and meta_query for a Custom Post TypeOh, I was not aware of that. Okay, this is my final code: http://pastebin.com/KE9P5efL
Forum: Fixing WordPress
In reply to: Trouble using orderby and meta_query for a Custom Post TypeI received my answer.
I was simply confused by the WordPress documentation which described ‘meta_value’ and ‘meta_key’ as being depreciated. But the fact is, I can (and must) use both in conjunction with meta_query to achieve my desired effect.
Use meta_query to query and capture the desired posts. Then, use meta_value and meta_key to manipulate those posts as I please. See below…
[Code moderated as per the Forum Rules. Please use the pastebin]
Forum: Plugins
In reply to: [Plugin: Business Directory] Ajax functionality not workingOkay, I’ve managed to solve the problem.
The issue was indeed a corrupted WordPress file, or files.
By copying a fresh version of the wp-includes folder and pasting it into my site, I managed to solve the described AJAX (SACK) and jQuery problem mentioned previously. This also fixed an issue where the WYSIWYG editor failed to function or appear properly.
Business Directory now works properly both in the back end and the front end.
Forum: Plugins
In reply to: [Plugin: Business Directory] Ajax functionality not workingUnfortunately I have not yet been able to resolve this problem. Also your problem seems different from mine.
The only instance this has happened that I could find (via google) was for a plugin called wp decoratr. However, the issue was resolved on the plugin author’s side and thus never fully explained.
I’ve also tried updating my wordpress installation from 2.8.1 to 2.8.2 but nothing changed.
Has no one else heard of, or have read something similar to this issue?