/** * Retrieve a collection of categories * * @param Fishpig_Wordpress_Model_Post $post * @retrun Fishpig_Wordpress_Model_Post_Category_Collection */ public function getParentCategories(Fishpig_Wordpress_Model_Post $post) { return Mage::getResourceModel('wordpress/post_category_collection')->addFieldToFilter('main_table.term_id', array('in' => $post->getCategoryIds())); }