Closed lmartins closed 9 years ago
CMB2 provides a number of built-in display options.
You could choose to only show your meta box on certain page IDs. What I tend to use is the page template option. For example, I display a meta box for pages which have the contact page template selected.
Let me know if I've misunderstood what you're trying to achieve!
I added cmb_field_map to pages, where to goal was to have the option for some pages to show a map. The pages in question are not known beforehand so I need a way to check if the be rendered or not. Since once attached to pages all pages will have coordinates information (when saving), are you planning on adding a switch to control this?
I can easily do it with another cmb2 field for hiding the information in the front-end, but im just wondering if there's a cleaner approach to that.
Thanks.