List all attachments from custom post type Sometimes you need to get all attachments (i.e. from a portfolio custom post type) and...
improve query with transients saving db requests Here is an example how to use transients in your WordPress loop for a portfolio...
WordPress WP_Query Comprehensive Reference Not really a functional WordPress snippet but a useful complete reference for wp_query and its...