What I ended up doing was setting up an endpoint for food, like so:
global $wp_rewrite;
$wp_rewrite->add_endpoint( 'food', EP_PERMALINK | EP_PAGES );
$wp_rewrite->flush_rules();
function printview_query_vars($vars)
{ array_push($vars, 'food');
return $vars;
}
add_filter('query_vars','printview_query_vars');
Then I’d get a url like http://mysite/pagename/food/fruits/shelves/
and the wp_query would contain something like food=>fruits/shelves
, which then i can parse myself into a custom query.