= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'BonAppetit' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'wpdocs_filter_wp_title', 10, 2 ); /** * Add support for comment reply. */ function bonappetit_enqueue_comments_reply() { if( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } if ( ! function_exists( 'bonappetit_setup' ) ) { function bonappetit_setup() { /** * Make the theme available for translation. */ $lang_dir = get_stylesheet_directory_uri() . '/languages'; load_theme_textdomain( 'BonAppetit', $lang_dir ); /** * Add support for title tag. */ add_theme_support( "title-tag" ); /** * Add support for post formats. */ add_theme_support( 'post-formats', array( 'gallery', 'link', 'image', 'quote', 'video', 'audio' ) ); /** * Add support for automatic feed links. */ add_theme_support( 'automatic-feed-links' ); /** * Add support for post thumbnails. */ add_theme_support( 'post-thumbnails' ); /** * Add support for custom background */ $args = array( 'default-color' => '000000', 'default-image' => get_template_directory_uri() . '/images/background.jpg', ); add_theme_support( 'custom-background', $args ); /** * Add support for custom header image */ $args = array( 'flex-width' => true, 'width' => 1000, 'flex-height' => true, 'height' => 300, 'default-image' => get_template_directory_uri() . '/images/header.jpg', ); add_theme_support( 'custom-header', $args ); /** * Register nav menus. */ register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'BonAppetit' ), 'secondary' => __( 'Secondary Menu', 'BonAppetit'), ) ); } add_action( 'after_setup_theme', 'bonappetit_setup' ); } // Register Custom Navigation Walker require_once('wp_bootstrap_navwalker.php'); /** * ---------------------------------------------------------------------------------------- * 5.0 - Display meta information for a specific post * ---------------------------------------------------------------------------------------- */ if (! function_exists('bonappetit_post_meta')) { function bonappetit_post_meta() { echo '