for posts and comments. */ add_theme_support('automatic-feed-links'); /* * Supporting title tag via add_theme_support (since WordPress 4.1) */ add_theme_support('title-tag'); /* * This theme supports a variety of post formats. */ add_theme_support('post-formats', array('aside', 'gallery', 'image', 'video', 'quote', 'audio', 'link', 'status',)); /* * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __('Primary Menu', 'artwork-lite') )); /* * This theme uses its own gallery styles. */ add_filter('use_default_gallery_style', '__return_false'); /* * Add theme support post thumbnails. */ if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); set_post_thumbnail_size(770, 578, true); } add_image_size('thumb-large', 1600, 900, true); add_image_size('thumb-large-blog', 1170, 543, true); add_image_size('thumb-medium', 960, 640, true); } add_action('after_setup_theme', 'theme_setup'); /** * Artwork page menu. * * Show pages of site. * * @since Artwork 1.0 */ function theme_wp_page_menu() { echo '
'; } /** * Artwork page top menu. * * Show pages of site. * * @since Artwork 1.0 */ function theme_wp_page_short_menu() { echo''; } /* Return the Google font stylesheet URL, if available. * * The use of Open Sans by default is localized. * * @since 1.0.0 * @access public * @return void */ function theme_load_google_fonts() { wp_register_style('Roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,300,700,300italic&subset=latin,cyrillic'); wp_enqueue_style('Roboto'); } add_action('wp_print_styles', 'theme_load_google_fonts'); /** * Enqueue scripts and styles for the front end. */ function theme_scripts_styles() { /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if (is_singular() && comments_open() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); /* * Scripts for template masonry blog */ wp_enqueue_script('jquery.infinitescroll', get_template_directory_uri() . '/js/jquery.infinitescroll.min.js', array('jquery'), '2.1.0', true); wp_enqueue_script('superfish.min', get_template_directory_uri() . '/js/superfish.min.js', array('jquery'), '1.7.5', true); wp_enqueue_script('jquery-labelauty', get_template_directory_uri() . '/js/jquery-labelauty.min.js', array('jquery',), '1.1', true); wp_enqueue_script('artwork-script', get_template_directory_uri() . '/js/artwork.min.js', array('jquery', 'superfish.min', 'jquery-labelauty', 'jquery.infinitescroll'), '1.0', true); $translation_array = array( 'url' => get_template_directory_uri() ); wp_localize_script('artwork-script', 'template_directory_uri', $translation_array); /* * Loads Artwork Styles */ wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array('bootstrap'), '4.3.0', 'all'); wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.5', 'all'); wp_enqueue_style('main', get_template_directory_uri() . '/css/artwork-style.min.css', array('bootstrap', 'font-awesome'), '1.0', 'all'); if (is_plugin_active('motopress-content-editor/motopress-content-editor.php') || is_plugin_active('motopress-content-editor-lite/motopress-content-editor.php')) { wp_enqueue_style('artwork-ames-motopress', get_template_directory_uri() . '/css/artwork-motopress.min.css', array('bootstrap', 'font-awesome', 'main'), '1.0', 'all'); } if (is_plugin_active('woocommerce/woocommerce.php')) { wp_enqueue_style('artwork-woocommerce', get_template_directory_uri() . '/css/artwork-woocommerce.min.css', array('bootstrap', 'font-awesome', 'main'), '1.0', 'all'); } if (is_plugin_active('bbpress/bbpress.php')) { wp_enqueue_style('artwork-bbpress', get_template_directory_uri() . '/css/artwork-bbpress.min.css', array('bootstrap', 'font-awesome', 'main'), '1.0', 'all'); } if (is_rtl()) { wp_enqueue_style('artwork-rtl', get_template_directory_uri() . '/css/artwork-rtl.min.css', array('bootstrap', 'font-awesome', 'main'), '1.0', 'all'); } /* * Loads our main stylesheet. */ wp_enqueue_style('artwork-style', get_stylesheet_uri(), array(), '1.0'); } add_action('wp_enqueue_scripts', 'theme_scripts_styles'); /** * Add favicon */ add_action('wp_head', 'theme_favicon', 4); /** * Title Tag backwards compatibility for older versions * */ if (!function_exists('_wp_render_title_tag')) { function theme_slug_render_title() { ?> max_num_pages > 1) : ?> __('Main Widget Area', 'artwork-lite'), 'id' => 'sidebar-1', 'description' => __('Appears on posts and pages in the sidebar.', 'artwork-lite'), 'before_widget' => '', 'before_title' => '