/**
* WP FanZone functions and definitions
*
* @package WP FanZone
*/
require get_template_directory() . '/inc/pagination.php';
require get_template_directory() . '/inc/widget.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 640; /* pixels */
}
if ( ! function_exists( 'wp_fanzone_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function wp_fanzone_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on WP FanZone, use a find and replace
* to change 'wp-fanzone' to the name of your theme in all the template files
*/
load_theme_textdomain( 'wp-fanzone', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( "title-tag" );
add_theme_support( 'automatic-feed-links' );
add_editor_style();
add_theme_support( 'post-thumbnails' );
add_image_size( 'widget-post-thumb', 70, 70, true );
add_image_size( 'post-thumb', 400, '200' , true );
add_image_size( 'slide-small-thumb', 130, 135 , true );
add_image_size( 'slide-medium-thumb', 265, 135 , true );
add_image_size( 'slide-large-image', 849, 424, true );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
//add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'wp-fanzone' ),
'top-menu'=>__('Top Menu', 'wp-fanzone')
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'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', 'quote', 'link',
) );
// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'wp_fanzone_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif; // wp_fanzone_setup
add_action( 'after_setup_theme', 'wp_fanzone_setup' );
if ( !function_exists( 'wp_fanzone_menu' ) ){
function wp_fanzone_menu() {
require get_template_directory() . '/inc/wpfanzoneMenu.php';
}
}
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function wp_fanzone_widgets_init() {
register_sidebar( array(
'name' => __( 'Homepage Sidebar', 'wp-fanzone' ),
'id' => 'defaul-sidebar',
'before_widget' => '",
'before_title' => '