Run a query in a custom widget?
-
hi to the wp members,
i’m building a custom widget that will call one post from a custom post type,
i use this query to call the post but for some reason it returns a different/wrong post,
query_posts("post_type=myptname&p='.$post.'&posts_per_page=1"); if ( have_posts() ) : while ( have_posts() ) : the_post();
i have try to add
&order=ASC
andorderby=menu_order
but none of this returns the correct postdoes anyone here knows how i can fix this?
is this query correct to use it in a custom widget or i have to build a different query?thanks a lot,
Philip
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Run a query in a custom widget?’ is closed to new replies.