Loading functions.php +16 −12 Original line number Diff line number Diff line Loading @@ -8,23 +8,27 @@ * @see https://developer.wordpress.org/themes/basics/theme-functions/ */ // add support for theme functions // - add support for post thumbnails // We support post thumbnails (now known as "featured images"). A post thumbnail is displayed // in the header of a post. // If there is no post thumbnail specified, we fall back to a default header image... add_theme_support('post-thumbnails'); // - add support for custom menus add_theme_support('menus'); // - add support for header image add_theme_support('custom-header', array('default-image'=>get_template_directory_uri().'/img/header.jpg', 'uploads'=>true)); function register_my_menu() { register_nav_menu('new-menu',__( 'New Menu' )); // ...which can also be customized (site-wide) add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri().'/img/header.jpg', 'uploads' => true) ); // And we also support a custom menu in the header // See https://developer.wordpress.org/reference/functions/register_nav_menu/ function register_fscoli_header_menu() { register_nav_menu('header-menu', 'Header-Menü'); } add_action( 'init', 'register_my_menu' ); add_action('init', 'register_fscoli_header_menu'); // add filters for theme // -add custom file types // We also allow the uploading of TeX files, which are blocked by default function fscoli_mime_types($mime_types){ $mime_types['tex'] = 'application/x-tex'; //LaTeX files $mime_types['tex'] = 'text/x-tex'; //TeX files return $mime_types; } add_filter('upload_mimes', 'fscoli_mime_types', 1, 1); Loading Loading
functions.php +16 −12 Original line number Diff line number Diff line Loading @@ -8,23 +8,27 @@ * @see https://developer.wordpress.org/themes/basics/theme-functions/ */ // add support for theme functions // - add support for post thumbnails // We support post thumbnails (now known as "featured images"). A post thumbnail is displayed // in the header of a post. // If there is no post thumbnail specified, we fall back to a default header image... add_theme_support('post-thumbnails'); // - add support for custom menus add_theme_support('menus'); // - add support for header image add_theme_support('custom-header', array('default-image'=>get_template_directory_uri().'/img/header.jpg', 'uploads'=>true)); function register_my_menu() { register_nav_menu('new-menu',__( 'New Menu' )); // ...which can also be customized (site-wide) add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri().'/img/header.jpg', 'uploads' => true) ); // And we also support a custom menu in the header // See https://developer.wordpress.org/reference/functions/register_nav_menu/ function register_fscoli_header_menu() { register_nav_menu('header-menu', 'Header-Menü'); } add_action( 'init', 'register_my_menu' ); add_action('init', 'register_fscoli_header_menu'); // add filters for theme // -add custom file types // We also allow the uploading of TeX files, which are blocked by default function fscoli_mime_types($mime_types){ $mime_types['tex'] = 'application/x-tex'; //LaTeX files $mime_types['tex'] = 'text/x-tex'; //TeX files return $mime_types; } add_filter('upload_mimes', 'fscoli_mime_types', 1, 1); Loading