[wp-hackers] Querying custom similar post types on single.php

Mitch Canter 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.

Mitch Canter
http://www.studionashvegas.com

> 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,
> AndrewJohnson
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
 		 	   		  


More information about the wp-hackers mailing list