How to get category/tag in URL for Pagination links?

Why can you not use the core functions previous_posts_link()/next_posts_link() or posts_nav_link(), all of which already account for the taxonomy archive context? EDIT: I think I understand your question now. You want pagination links, rather than previous/next page links. WordPress also has a native function for pagination links: paginate_links() (Codex ref). Here’s how I use this … Read more

Cache DB queries result

As long as you use WP API ($wpdb) to perform queries, they will be cached by caching plugins (well, by those that have such functionality). If you need to cache data that is more compelx to generate rather than just retrieve look into Transients API.

Query specific Pages

As you can see on http://codex.wordpress.org/Function_Reference/get_pages you can query by meta_key , so to query by product custom field, you will do something like this . $args=array( ‘meta_key’ => ‘product’ ); $pages = get_pages( $args );