__( 'Main Primary Navigation', 'amp' ), 'secondary' => __( 'Secondary Mobile Navigation', 'amp' ), 'footer' => __( 'Secondary Footer Navigation', 'amp' ) ) ); // supports custom header upload image // Add a filter to image_width and image_height to change the width and height of your custom header. $custom_header_support = array( 'default-image' => get_template_directory_uri() . '/assets/logo-256.png', 'random-default' => false, 'flex-height' => true, 'flex-width' => true, 'uploads' => true, 'header-text' => false, 'width' => 426, 'height' => 100, ); add_theme_support( 'custom-header', $custom_header_support ); /** * Custom background color and image support */ //add_theme_support( 'custom-background' ); $args = array( 'default-color' => 'FAFAFB', 'default-image' => '', ); add_theme_support( 'custom-background', $args ); } add_action('after_setup_theme', 'amp_setup'); /** * scripts and styles */ function amp_add_theme_scripts() { // Loads default main stylesheet. wp_enqueue_style( 'amp-style', get_stylesheet_uri() ); // Font awsome enqueue wp_enqueue_style( 'amp-font-awesome', get_template_directory_uri() .'/assets/fonts/css/font-awesome.css' ); // Script to help html5 wp_enqueue_script( 'amp-modernizer-js', get_template_directory_uri() .'/assets/modernizr.js', array( 'jquery' ), '', true ); // Script to call up mobile menu wp_enqueue_script( 'amp-mobile', get_template_directory_uri() . '/assets/amp-mobile.js', array('jquery'), '1.0.0', true ); /* * 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' ); } add_action( 'wp_enqueue_scripts', 'amp_add_theme_scripts' ); /** Add ie conditional html5 shim to header removed * @since 0.7 function amp_add_ie_html5_shim () { echo "\n"; } add_action('wp_head', 'amp_add_ie_html5_shim'); * */ /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * @since 0.7 * @global int $content_width */ function amp_content_width() { global $content_width; if ( !isset( $content_width ) ) { $content_width = 720; } } add_action( 'after_setup_theme', 'amp_content_width', 0 ); /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view. * * @since amp 0.4 * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string Filtered title. */ function amp_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'amp' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'amp_wp_title', 10, 2 ); // the widget invoked here function amp_widgets_init() { register_sidebar(array( 'name' => __('Primary Footer Widget Right Side', 'amp'), 'id' => 'sidebar', 'description' => __('The main footer widget area', 'amp'), 'before_widget' => '
', 'before_title' => '