These are chat archives for WebDevStudios/CMB2

29th
Mar 2017
madvic
@madvik
Mar 29 2017 16:20
Hi, I want to know the different options of a function: new_cmb2_box(), but nothing in the documentation : https://cmb2.io/api/function-new_cmb2_box.html
It is possible to add a link in the documentaiton for all options.
Ian Barker
@iantbarker
Mar 29 2017 16:25
I'm trying to display different metaboxes on different page templates but can't get it to work
Justin Sternberg
@jtsternberg
Mar 29 2017 16:26
you're right, the metabox options need better documentation. The docs are a wiki, so feel free to update them as you see fit and ping me to review
Ian Barker
@iantbarker
Mar 29 2017 16:26
The issue seems to be that I have a set of metaboxes that I want displayed on every page/post, but I can't keep those metaboxes and then add new ones on different templates
Justin Sternberg
@jtsternberg
Mar 29 2017 16:27
Sure you can
You can use the show_on_cb box property to determine if/when a box should show
Ian Barker
@iantbarker
Mar 29 2017 16:28
Like this?
    'show_on'      => array( 'key' => 'page-template', 'value' => 'page-specials.php' ),
madvic
@madvik
Mar 29 2017 16:29
@jtsternberg Thanks
Ian Barker
@iantbarker
Mar 29 2017 16:32
@jtsternberg I thought Page Template show_on filter would accomplish this but breaks everything
@jtsternberg By break, I mean no metaboxes appear
Justin Sternberg
@jtsternberg
Mar 29 2017 20:10
@iantbarker I'm not sure, maybe open an issue on Github and @tw2113 might be able to look at it with you. Be sure to include your entire config code.
Ian Barker
@iantbarker
Mar 29 2017 20:42
Ok thanks