What you need to do is place all of your code for the custom post types and meta boxes in a plugin file, and then network activate the plugin. So your plugin might look like this, more or less:
/*
Plugin Name: Custom Functions Plugin
Plugin URI: https://pippinsplugins.com/
Description: Put custom functions in this plugin
Author: Pippin Williamson
Author URI: https://pippinsplugins.com
Version: 1.0
*/
/////////////////////////////////////////////////
// notice custom post type
/////////////////////////////////////////////////
function pippin_create_notices() {
$labels = array(
'name' => _x( 'Notices', 'post type general name' ), // Tip: _x('') is used for localization
'singular_name' => _x( 'Notice', 'post type singular name' ),
'add_new' => _x( 'Add New', 'Notice' ),
'add_new_item' => __( 'Add New Notice' ),
'edit_item' => __( 'Edit Notice' ),
'new_item' => __( 'New Notice' ),
'view_item' => __( 'View Notice' ),
'search_items' => __( 'Search Notices' ),
'not_found' => __( 'No Notices found' ),
'not_found_in_trash' => __( 'No Notices found in Trash' ),
'parent_item_colon' => ''
);
$annoucement_args = array(
'labels' =>$labels,
'singular_label' => __('Notice'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => false,
'supports' => array('title', 'editor'),
);
register_post_type('notices', $annoucement_args);
}
add_action('init', 'pippin_create_notices');
So that will create a plugin called “Custom Functions Plugin”. Simply save the file as “custom-functions.php”, place it in your plugins/ folder and network activate it. You will need to add your meta box code to the plugin, obviously.