Skip to content

I.ring webs

  • Portfolio
  • Services
  • Our Philosophy
  • Contact
Posted on November 13, 2007May 2, 2013 by admin

WordPress query to select a post that belongs to two categories

$q = ‘ SELECT post_id FROM wp_post2cat a WHERE a.post_id in ( select b.post_id FROM wp_post2cat b where category_id = 9 ) and category_id = ‘. $cat[1]->cat_ID .’ ‘;

CategoriesWordPress Plugins and good code samples

Post navigation

Previous PostPrevious WordPress Configuration steps
Next PostNext Hiphop Archive [dot] org
Proudly powered by WordPress