__( 'Primary Menu', 'arunachala' ),
) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery' ) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'arunachala_custom_background_args', array(
'default-color' => 'fff',
'default-image' => '',
) ) );
// Enable support for HTML5 markup.
add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) );
}
endif; // arunachala_setup
add_action( 'after_setup_theme', 'arunachala_setup' );
/**
* Register widgetized area and update sidebar with default widgets.
*/
function arunachala_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'arunachala' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'arunachala_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function arunachala_scripts() {
// Add Genericons font, used in the main stylesheet.
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.3' );
wp_enqueue_style( 'arunachala-style', get_stylesheet_uri(), array( 'genericons' ) );
wp_enqueue_script( 'arunachala-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
if ( is_front_page() || is_home () ) {
wp_enqueue_script( 'arunachala-jquery-cycle', get_template_directory_uri() . '/js/jquery.tcycle.js', array( 'jquery' ) );
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'arunachala_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';
require get_template_directory() . '/inc/homepage-content.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';
/**
* Replaces the excerpt "more" text by a link
*/
function new_excerpt_more($more) {
global $post;
return ' ...';
}
add_filter('excerpt_more', 'new_excerpt_more');
/**
* Setting escerpt length and read more link
*/
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function excerpt_read_more_link($output) {
global $post;
return $output . ' '.__("Read more", "arunachala").'';
}
add_filter('the_excerpt', 'excerpt_read_more_link');