for posts and comments. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in two locations. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'foodrecipes-full-width', 1038, 576, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'foodrecipes' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); add_theme_support( 'custom-background', apply_filters( 'foodrecipes_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'foodrecipes_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // foodrecipes_setup add_action( 'after_setup_theme', 'foodrecipes_setup' ); // Implement Custom Header features. require get_template_directory() . '/function/custom-header.php'; //foodrecipes theme custom widget require_once('function/foodrecipes-post-widget.php'); //foodrecipes theme theme option require_once('theme-options/fasterthemes.php'); /*** TGM ***/ require_once('function/tgm-plugins.php'); /** * Add default menu style if menu is not set from the backend. */ function foodrecipes_add_menuid ($page_markup) { preg_match('/^
/i', $page_markup, $foodrecipes_matches); $foodrecipes_divclass = ''; if(!empty($foodrecipes_matches)) { $foodrecipes_divclass = $foodrecipes_matches[1]; } $foodrecipes_toreplace = array('
', '
'); $foodrecipes_replace = array(''); $foodrecipes_new_markup = str_replace($foodrecipes_toreplace,$foodrecipes_replace, $page_markup); $foodrecipes_new_markup= preg_replace('/