echo value from ‘select’ field type into page template using cmb2?

For starters, I recommend you use the API for register metaboxes and fields which can be seen here: https://github.com/WebDevStudios/CMB2/wiki/Basic-Usage#create-a-metabox. To echo the select option’s label, you would do something like this: add_action( ‘cmb2_admin_init’, ‘custom_metabox’ ); function custom_metabox() { $cmb = new_cmb2_box( array( ‘id’ => REALIA_PROPERTY_PREFIX . ‘ficha_tecnica’, ‘title’ => ‘Ficha Técnica’, ‘object_types’ => array( ‘property’ … Read more

Limit the number of posts in query_posts function with custom post types

Something like this is what you need. The Codex page for WP_Query is very helpful $args = array(‘post_type’ => ‘<your custom post type name>’, ‘posts_per_page’ => 5, ‘tax_query’ => array( array( ‘taxonomy’ => ‘<your custom taxonomy name>’, ‘field’ => ‘slug’, ‘terms’ => ‘event-england’ ) ) ) $query = new WP_Query($args)