= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'ow_axio_theme' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'ow_axio_theme_wp_title', 10, 2 ); //Content-width $defaults = array( 'post' => '500', 'page' => '500', 'attachment' => '650', 'artist' => '300', 'movie' => '400' ); add_theme_support( 'content-width', $defaults ); if ( ! isset( $content_width ) ) $content_width = 900; load_theme_textdomain( 'ow_axio_theme', get_template_directory() . '/languages' ); // Add RSS feed links to
for posts and comments. add_theme_support( 'automatic-feed-links' ); // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'ow_axio_theme-full-width', 1038, 576, true ); add_image_size( 'thumbnail-blog', 940, 200, true); add_image_size( 'homepage', 100, 400, true); add_image_size( 'thumb-clients-wg', 9999, 90, array( 'left', 'top' ) ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'main-menu' => __( 'Main ', 'ow_axio_theme' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'ow_axio_theme_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); // Register Styles function ow_styles() { wp_register_style( 'style', get_template_directory_uri().'/css/style.css', '1.1', 'all' ); wp_register_style( 'bootstrap', get_template_directory_uri().'/css/bootstrap.css', '1.1', 'all' ); wp_register_style( 'animated-progress', get_template_directory_uri().'/css/animated-progress.css', '1.1', 'all' ); wp_register_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome/css/font-awesome.min.css', '1.1', 'all' ); wp_enqueue_style('font-awesome'); wp_enqueue_style( 'bootstrap' ); wp_enqueue_style( 'animated-progress' ); wp_enqueue_style( 'style' ); } // Hook into the 'wp_enqueue_scripts' action //add_action( 'wp_head', 'ow_styles' ); add_action('wp_enqueue_scripts', 'ow_styles'); // Sidebars for Axio Theme function axio_widgets_inits() { register_sidebar( array( 'id' => 'blog', 'name' => 'Blog') ); register_sidebar( array( 'id' => 'contact', 'name' => 'Contact') ); register_sidebar( array( 'id' => 'header', 'name' => 'Header') ); register_sidebar( array( 'id' => 'footer-1', 'name' => 'Footer Column 1') ); register_sidebar( array( 'id' => 'footer-2', 'name' => 'Footer Column 2') ); register_sidebar( array( 'id' => 'footer-3', 'name' => 'Footer Column 3') ); } add_action( 'widgets_init', 'axio_widgets_inits' ); /*------------ ADMIN PANEL INIT -------*/ include(TEMPLATEPATH . '/admin-folder/admin/admin-init.php'); /*------------ FUNCTIONS --------------*/ function wpbootstrap_scripts_with_jquery() { // Register the script like this for a theme: wp_register_script( 'custom-script', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) ); // For either a plugin or a theme, you can then enqueue the script: wp_enqueue_script( 'custom-script' ); } add_action( 'wp_enqueue_scripts', 'wpbootstrap_scripts_with_jquery' ); class BootstrapNavMenuWalker extends Walker_Nav_Menu { function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); $submenu = ($depth > 0) ? ' sub-menu' : ''; $output .= "\n$indent