cyberhobo / wp-geo-mashup-search

DEPRECATED This functionality is included in Geo Mashup 1.5! No need for a separate plugin any more, you'll get an error if you try to install both.
5 stars 1 forks source link

Getting the "Search" loop to work with a custom query #1

Closed trewknowledge closed 13 years ago

trewknowledge commented 13 years ago

Hello,

So I am using Geo Mashup Search and the search results are for a Custom Post Type.

Everything is working fine except for when I want to display some custom meta information ( echo get_post_meta($post->ID, "_address", true); ).

I have tried using a custom query before the loop such as :

query_posts('post_type=CPTNAME&post_status=publish&posts_per_page=-1');

however this doesn't seem to be working.

Any suggestions?

trewknowledge commented 13 years ago

To answer my own question...

I removed my custom query (query_posts('post_type=CPTNAME&post_status=publish&posts_per_page=-1');) and instead of using $post->ID within get_post_meta I used get_the_ID()

Cheers!