Home>Support>How to implement metaslider for new custom post type

How to implement metaslider for new custom post type

Hi i want to use the metaslider / metaboxes on a custom post type. How can i implement this?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi Patrick

    If you dive into /inc/metaslider.php line 70 you’ll see the metabox being created. “page” is what it’s being added to. This is totally untested but perhaps try the following in the functions.php file of your child theme:

    function vantage_child_metaslider_page_setting_metabox(){
    	add_meta_box('vantage-metaslider-page-slider', __('Page Meta Slider', 'vantage'), 'vantage_metaslider_page_setting_metabox_render', 'custom_post_type', 'side');
    }
    add_action('add_meta_boxes', 'vantage_child_metaslider_page_setting_metabox');
    

    Change custom_post_type to your post type.

  2. 9 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Because this is untested, please don’t add the above without having FTP access open. If it fires an error you’ll need to revert to the previous version of your child theme functions file.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More