tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* 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' );
add_image_size('featured-thumb',600,600,true);
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'amora' ),
) );
/*
* 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', 'quote', 'link'
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'amora_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
add_theme_support( 'custom-header' );
}
endif; // amora_setup
add_action( 'after_setup_theme', 'amora_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function amora_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'amora' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer 1', 'amora' ),
'id' => 'sidebar-2',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer 2', 'amora' ),
'id' => 'sidebar-3',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer 3', 'amora' ),
'id' => 'sidebar-4',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer 4', 'amora' ),
'id' => 'sidebar-5',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'amora_widgets_init' );
/**
* Enqueue scripts and styles.
*/
/**
*Enqueuing the fonts
*/
function amora_fonts_url() {
$fonts_url = '';
$noto_sans = _x('on', 'Noto Sans font: on or off', 'amora');
if ( 'off' !== $noto_sans) {
$font_families = array();
if ('off' !== $noto_sans ) {
$font_families[] = 'Noto Sans:400,700,400 Italic,700 Italic';
}
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
}
$fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
return $fonts_url;
}
function amora_scripts_styles() {
wp_enqueue_style( 'amora-fonts', amora_fonts_url(), array(), null );
}
add_action( 'wp_enqueue_scripts', 'amora_scripts_styles' );
function amora_scripts() {
wp_enqueue_style( 'amora-style', get_stylesheet_uri() );
if (get_theme_mod('page_layout') == 'right') {
wp_enqueue_style('amora-layout',get_template_directory_uri()."/css/layout/content-sidebar.css");
}
else
{
wp_enqueue_style('amora-layout',get_template_directory_uri()."/css/layout/sidebar-content.css");
}
wp_enqueue_style('amora-bootstrap-style',get_template_directory_uri()."/css/bootstrap/bootstrap.min.css", array('amora-layout'));
$skin = get_theme_mod('skin','main');
wp_enqueue_style('amora-main-skin', get_template_directory_uri()."/css/skins/" . $skin . ".css",array('amora-bootstrap-style'));
wp_enqueue_style('bx-slider-default-theme-skin', get_template_directory_uri(). "/css/slider/jquery.bxslider.css", array('amora-main-skin'));
wp_enqueue_script( 'amora-js', get_template_directory_uri() . '/js/jquery-1.11.2.js', array('jquery'));
wp_enqueue_script( 'amora-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'amora-custom-js', get_template_directory_uri() . '/js/custom.js', array(), true );
wp_enqueue_script( 'amora-slider-js', get_template_directory_uri() . '/js/jquery.bxslider.min.js', array(), true );
wp_enqueue_script( 'amora-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
function amora_initialize_header() {
?>
str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'type' => 'array'
) );
if( is_array($page_format) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '';
}}
function amora_social() {
global $opt_amora;
return $opt_amora['social'];
}
add_action( 'wp_enqueue_scripts', 'amora_scripts' );
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';