2000, 'height' => 300, ); add_theme_support( 'custom-header', $args ); add_theme_support('custom-logo', array( 'size' => 'foodicious-thumb' )); add_action('after_setup_theme', 'foodicious_setup'); /* Register Menu */ register_nav_menus( array( 'main' => __( 'Main Menu', 'foodicious' ) ) ); /* Make theme available for translation */ load_theme_textdomain( 'foodicious', get_template_directory() . '/languages' ); /* Add gallery format and custom gallery support */ add_theme_support( 'post-formats', array( 'gallery' ) ); add_theme_support( 'array_themes_gallery_support' ); // Add support for legacy widgets add_theme_support( 'array_toolkit_legacy_widgets' ); // Theme Activation Notice global $pagenow; if ( is_admin() && ('themes.php' == $pagenow) && isset( $_GET['activated'] ) ) { add_action( 'admin_notices', 'foodicious_activation_notice' ); } } endif; // foodicious_setup add_action( 'after_setup_theme', 'foodicious_setup' ); /* Enqueue scripts and styles */ function foodicious_scripts() { $version = wp_get_theme()->Version; //Main Stylesheet wp_enqueue_style( 'foodicious-style', get_stylesheet_uri() ); //Font Awesome wp_enqueue_style( 'foodicious-font-awesome', get_template_directory_uri() . "/includes/css/font-awesome.css", array(), '4.7.0', 'screen' ); //grid css //Fitvids wp_enqueue_script( 'foodicious-jquery-fitvids', get_template_directory_uri() . '/includes/js/fitvid/jquery.fitvids.js', array( 'jquery' ), '1.0.3', true ); //matchheight wp_enqueue_script( 'foodicious-jquery-matchheight', get_template_directory_uri() . '/includes/js/matchheight/matchheight.js', array( 'jquery' ), $version, true ); //micromodal wp_enqueue_script( 'foodicious-jquery-micromodal', get_template_directory_uri() . '/includes/js/micromodal/micromodal.js', array( 'jquery' ), $version, true ); //outline.js wp_enqueue_script( 'foodicious-jquery-outline', get_template_directory_uri() . '/includes/js/outline/outline.js', array( 'jquery' ), $version, true ); //Custom Scripts wp_enqueue_script( 'foodicious-custom-js', get_template_directory_uri() . '/includes/js/custom/custom.js', array( 'jquery' ), $version, true ); //Slickslider wp_enqueue_script( 'foodicious-jquery-slickslider', get_template_directory_uri() . '/includes/js/slickslider/slick.min.js', array( 'jquery' ), '1.8.0', true ); wp_enqueue_script( 'foodicious-jquery-slicknav', get_template_directory_uri() . '/includes/js/slicknav/jquery.slicknav.min.js', array( 'jquery' ), $version, true ); wp_register_style('foodicious-responsive', get_template_directory_uri() . '/css/responsive.css'); if(!get_theme_mod('foodicious_general_responsive')) { wp_enqueue_style('foodicious-responsive'); } //HTML5 IE Shiv wp_enqueue_script( 'foodicious-jquery-htmlshiv', get_template_directory_uri() . '/includes/js/html5/html5shiv.js', array(), '3.7.0', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'foodicious_scripts' ); function foodicious_excerpt_more( $more ) { if ( !is_admin()) { return '...'; } } add_filter('excerpt_more', 'foodicious_excerpt_more'); // Widgets include(get_template_directory() . '/inc/widgets/about_widget.php'); include(get_template_directory() . '/inc/widgets/social_widget.php'); include(get_template_directory() . '/inc/widgets/category_post_widget.php'); /* Set the content width */ if ( ! isset( $content_width ) ) $content_width = 690; /* pixels */ /* Register sidebars */ function foodicious_register_sidebars() { register_sidebar( array( 'name' => __( 'Sidebar', 'foodicious' ), 'id' => 'sidebar', 'description' => __( 'Widgets in this area will be shown on the sidebar of all pages.', 'foodicious' ), 'before_widget' => '
' ) ); register_sidebar( array( 'name' => __( 'Below Slider', 'foodicious' ), 'id' => 'below-slider', 'description' => __( 'This widget area is for Newsletter, Ads, Most popular widgets, etc.', 'foodicious' ), 'before_widget' => ' ', 'before_title' => ''. esc_html__( 'Thank you for choosing Foodicious! Now, we highly recommend you to visit our welcome page.', 'foodicious' ) .'
'; echo ''. esc_html__( 'Get Started with Foodicious', 'foodicious' ) .'
'; echo '' . get_avatar( get_the_author_meta('user_email') , 160 ) . '
'; if ( ! empty( $display_name ) ) { $author_details .= ' '; $author_details .= '' . '' . esc_html($display_name) . '
' . nl2br($user_description) . '
'; } // Pass all this info to post content $content = $content . ''; } echo $content; } function foodicious_getCategory() { $category = get_the_category(); $useCatLink = true; // If post has a category assigned. if ($category) { $category_display = ''; $category_link = ''; if (class_exists('WPSEO_Primary_Term')) { $wpseo_primary_term = new WPSEO_Primary_Term('category', get_the_id()); $wpseo_primary_term = $wpseo_primary_term->get_primary_term(); $term = get_term($wpseo_primary_term); if (is_wp_error($term)) { // Default to first category if an error is returned $category_display = $category[0]->name; $category_link = get_category_link($category[0]->term_id); } else { // Primary category $category_display = $term->name; $category_link = get_category_link($term->term_id); } } else { // Default, display the first category in WP's list of assigned categories $category_display = $category[0]->name; $category_link = get_category_link($category[0]->term_id); } // Display category if (!empty($category_display)) { if ($useCatLink == true && !empty($category_link)) { echo ''; echo '' . esc_html($category_display) . ''; echo ''; } else { echo '' . esc_html($category_display) . ''; } } } } //theme options include(get_template_directory() . '/foodicious_custom_controller.php'); include(get_template_directory() . '/customizer_style.php'); //kirki themeoptions if ( class_exists( 'kirki' ) ) { include(get_template_directory() . '/theme-options.php'); } if ( ! function_exists( 'wp_body_open' ) ) { /** * Fire the wp_body_open action. * * Added for backwards compatibility to support WordPress versions prior to 5.2.0. */ function wp_body_open() { /** * Triggered after the opening
$depth, 'max_depth' => $args['max_depth'] ) ) ) ?>