Title: using multiple cmb2 blocks
Last modified: August 31, 2016

---

# using multiple cmb2 blocks

 *  Resolved [callender](https://wordpress.org/support/users/jimcallender/)
 * (@jimcallender)
 * [10 years ago](https://wordpress.org/support/topic/using-multiple-cmb2-blocks/)
 * Hi there,
 * I want to use this for a number of different custom templates.
 * Can you provide a couple of examples to show how the declarations are different
   to target by slug – ie: content-archive.php, and content-profile.php.
 * Currently I can only get this working on front page, and all pages.
 * Thank you,
 * [https://wordpress.org/plugins/cmb2/](https://wordpress.org/plugins/cmb2/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years ago](https://wordpress.org/support/topic/using-multiple-cmb2-blocks/#post-7407782)
 * Not quite following. Half of the implementation is getting the metaboxes into
   the page editors so you can set custom meta for each page.
 * The rest would be querying for that saved data for the current page being displayed.
   At least at the basic level, this would just be a matter of using some of the
   helper functions from the provided examples file to fetch the post meta data 
   and display how needed for the current page. Not really something extremely dependent
   on the current file being rendered.
 * However, if I’m misunderstanding or missing some points, please let me know.
 *  Thread Starter [callender](https://wordpress.org/support/users/jimcallender/)
 * (@jimcallender)
 * [10 years ago](https://wordpress.org/support/topic/using-multiple-cmb2-blocks/#post-7407818)
 * thanks for the reply – i’ve sorted it now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘using multiple cmb2 blocks’ is closed to new replies.

 * ![](https://ps.w.org/cmb2/assets/icon.svg?rev=2866672)
 * [CMB2](https://wordpress.org/plugins/cmb2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cmb2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cmb2/)
 * [Active Topics](https://wordpress.org/support/plugin/cmb2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cmb2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cmb2/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [callender](https://wordpress.org/support/users/jimcallender/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/using-multiple-cmb2-blocks/#post-7407818)
 * Status: resolved