{"id":9846,"date":"2020-02-17T18:20:07","date_gmt":"2020-02-17T18:20:07","guid":{"rendered":"http:\/\/themenectar.com\/docs\/salient\/?page_id=9846"},"modified":"2020-02-17T18:20:07","modified_gmt":"2020-02-17T18:20:07","slug":"metabox-cpt","status":"publish","type":"page","link":"https:\/\/themenectar.com\/docs\/salient\/metabox-cpt\/","title":{"rendered":"metabox cpt"},"content":{"rendered":"\n
As of version 12, the Salient metaboxs found on pages can now be added to a custom post type through a filter in your child theme.<\/p>\n\n\n\n
\n\/\/ Add Salient meta boxes to custom post types.\nfunction salient_child_page_header_post_types($post_types) {\n\t\n\t$new_post_types = array(\n\t\t'your_custom_post_type'\n\t);\n \n\t$post_types = array_merge($new_post_types, $post_types);\n \n\treturn $post_types;\n}\n\nadd_filter('nectar_metabox_post_types_page_header', 'salient_child_page_header_post_types');\n\n<\/pre><\/div>\n\n\n
As of version 12, the Salient metaboxs found on pages can now be added to a custom post type through a filter in your child theme. Step 1:\u00a0Open your child…<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages\/9846"}],"collection":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/comments?post=9846"}],"version-history":[{"count":0,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages\/9846\/revisions"}],"wp:attachment":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/media?parent=9846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}