'sidebar-1', 'container' => 'post-archives', 'render' => 'corporately_infinite_scroll_render', 'footer' => 'colophon', 'post_per_page' => 8, ) ); // Add theme support for Responsive Videos. add_theme_support( 'jetpack-responsive-videos' ); // Add theme support for Social Menus add_theme_support( 'jetpack-social-menu' ); // Add theme support for site logos add_image_size( 'corporately-logo', 200, 200 ); add_theme_support( 'site-logo', array( 'size' => 'corporately-logo' ) ); // Add theme support for JetPack Portfolio add_theme_support( 'jetpack-portfolio' ); // Add theme support for JetPack Testimonial add_theme_support( 'jetpack-testimonial' ); } add_action( 'after_setup_theme', 'corporately_jetpack_setup' ); /** * Add Custom Fields to JetPack Custom Content Types */ function corporately_jetpack_add_cf_support() { add_post_type_support( 'jetpack-portfolio', 'custom-fields' ); add_post_type_support( 'jetpack-testimonial', 'custom-fields' ); } add_action( 'init', 'corporately_jetpack_add_cf_support' ); /** * Make Custom Fields hidden by default in JetPack Portfolios and Testimonials * @link https://www.vanpattenmedia.com/2014/code-snippet-hide-post-meta-boxes-wordpress */ function corporately_jetpack_default_hide_cf( $hidden, $screen ) { // Grab the current post type $post_type = $screen->post_type; // If we're on a 'jetpack-portfolio' or 'jetpack-testimonial'... if ( $post_type == 'jetpack-portfolio' || $post_type == 'jetpack-testimonial' ) { // Define which meta boxes we wish to hide $hidden = array( 'postcustom', 'slugdiv' ); // Pass our new defaults onto WordPress return $hidden; } // If we are NOT on a JetPack Custom Content Type, use the original defaults return $hidden; } add_action( 'default_hidden_meta_boxes', 'corporately_jetpack_default_hide_cf', 10, 2 ); /** * Custom render function for Infinite Scroll. */ function corporately_infinite_scroll_render() { while ( have_posts() ) { the_post(); if ( is_search() ) : get_template_part( 'components/post/content', 'none' ); else : echo '