Enable upload of exe files in WordPress

PHP

// Allow upload of exe file type
add_filter( 'upload_mimes', 'themeslug_mime_types' );
function themeslug_mime_types( $mime_types ) {
    $mime_types[ 'exe' ]  = 'application/x-msdownload';
    return $mime_types;
}
add_filter( 'wp_check_filetype_and_ext', 'themeslug_wp_check_filetype_and_ext', 10, 4 );
function themeslug_wp_check_filetype_and_ext( $types, $file, $filename, $mimes ){
	if(substr($filename, -4) == ".exe" && $types['ext'] == "" && $types['type'] == ""){
        $filetype = wp_check_filetype( $filename, $mimes );
		$types['ext'] = $filetype['ext'];
		$types['type'] = $filetype['type'];
	}
	return $types;
}

Custom post states

// custom post state
add_filter('display_post_states', 'theme_slug_custom_post_states');
function theme_slug_custom_post_states($states) {
    global $post;
    if( ('page' == get_post_type($post->ID) ) && get_page_template_slug( $post->ID ) ) {
		$templates = get_page_templates();
		if( empty( $templates ) ){
			return $states;
		}
		$template_slug = get_page_template_slug( $post->ID );
		foreach ( $templates as $key => $value ) {
			if ( $value == $template_slug ){
				$states[] = "<small>" . $key . " template</small>";
			}
		}
    }
    return $states;
}

Using wp_nav_menu for creating submenu

functions.php

// filter menu to submenu
add_filter( 'wp_nav_menu_objects', 'submenu_limit', 10, 2 );
function submenu_limit( $items, $args ) {
	if ( empty( $args->page_parent ) ) {
		return $items;
	}
	$subitems = array();
	foreach ($items as $key => $item) {
		if($item->post_parent == $args->page_parent){
			$subitems[] = $item;
		}
	}
	foreach ($subitems as $key => $subitem) {
		submenu_get_children($items, $subitems, $subitem);
	}
	return $subitems;
}
function submenu_get_children($items, &$subitems, $subitem){
	foreach ($items as $key => $item) {
		if($subitem->ID == $item->menu_item_parent){
			$subitems[] = $item;
			submenu_get_children($items, $subitems, $item);
		}
	}
}

Usage in template

$parents = get_post_ancestors( $post->ID );
$parent_id = ($parents) ? $parents[count($parents)-1]: $post->ID;
$args = array(
    'post_parent' => $parent_id,
);
$children = get_children( $args );

// optional, check if page has children
if($children){
	wp_nav_menu([
		'menu'            => 'menu-1',
		'theme_location'  => 'menu-1',
		'container'       => '',
		'container_id'    => '',
		'container_class' => '',
		'menu_id'         => false,
		'menu_class'      => 'navbar-nav',
		'depth'           => 3,
		'page_parent'	  => $parent_id
	]);
}

Add styles for TinyMCE editor

// tinymce styles
// Callback function to insert 'styleselect' into the $buttons array
function my_mce_buttons_2( $buttons ) {
	array_unshift( $buttons, 'styleselect' );
	return $buttons;
}
// Register our callback to the appropriate filter
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' );

// Callback function to filter the MCE settings
function my_mce_before_init_insert_formats( $init_array ) {
	// Define the style_formats array
	$style_formats = array(
		// Each array child is a format with it's own settings
		array(
			'title' => 'Button',
			'classes' => 'btn',
			'selector' => 'a',
			'wrapper' => false,
		),
        array(
			'title' => 'Info box',
			'block' => 'div',
			'classes' => 'info-box',
			'wrapper' => true,
		)
	);
	// Insert the array, JSON ENCODED, into 'style_formats'
	$init_array['style_formats'] = json_encode( $style_formats );
	return $init_array;
}
// Attach callback to 'tiny_mce_before_init'
add_filter( 'tiny_mce_before_init', 'my_mce_before_init_insert_formats' );