[wp-hackers] Querying custom similar post types on single.php
mitch at mitchcanter.com
Fri Mar 25 05:00:02 UTC 2011
Global variables work wonders here:
$post->post_category I believe is what you can set as your needed variable, then use wp_query or query_posts and cat=your variable to grab the proper category ID.
> From: andrew at difted.com
> Date: Thu, 24 Mar 2011 23:54:03 -0500
> To: wp-hackers at lists.automattic.com
> Subject: [wp-hackers] Querying custom similar post types on single.php
> anyone have recommendations on how to query custom posts from same lowest level category as the custom post you're currently viewing on a single.php? (Ex: Media Category -> Lower Level Category -> Custom Post ) Nothing out there I've found is working.
> Thanks in advance,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers