macroclick
Forum Replies Created
-
AuthorPosts
-
Yes! Looks good now thanks! May I ask what you changed so I can fix if it pops up again?
On the other point, It works for me in Firefox and IE 11, but still no joy in Chrome… I will get a hold of another computer to see if it works there. I did clear the cache.
Thanks! Appreciate it!
JohnI am using a Windows 8 laptop with Chrome and Firefox. But I have been using it as I’ve been developing the site. I just tried it now with my Nexus 5x and it seems to work fine although it doesn’t display correctly. See the attached screenshot. Do I need to clear the cache or something on my laptop browser to get it working again? Do you know why the menu in Android Chrome doesn’t display correctly?
This reply has been marked as private.Follow up to this – is there any way to output the listings I query, in the format of the output of widgets and shortcodes, like gd_listings? Can I use any shortcodes or functions, or do I need to format my own custom html?
Had to tweak the query to get it working – replace gd.gd_city with gd.post_city:
$post_arr = $wpdb->get_results($wpdb->prepare( "SELECT * FROM $wpdb->posts p JOIN " . $table . " gd ON gd.post_id=p.ID WHERE gd.post_city=%s ", array('Manorville') ) , ARRAY_A);
May need a more complicated query but will give it a try before consulting you.
Thanks again!
Great, ok. Sounds good – I’ll play with this code and let you know if I’m having trouble getting the query to work.
Much Appreciated!
John
As an example:
$args = array( 'post_type' => 'gd_place', 'post_zip' => '11949' ); $the_query = new WP_Query( $args ); echo $the_query->found_posts; wp_reset_postdata();
This doesn’t filter any post_zip codes and gives me back the number of all posts in gd_place. I tried including a meta query:
'meta_query' => array( array( 'key' => 'gd_city', 'value' => 'manorville', 'compare' => '=' )
(with zip code also) but it seems like these fields aren’t meta data??
hoping someone can help
-
AuthorPosts