__( 'Primary Menu', 'hollandex' ),
) );
/*
* 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(
'image', 'video', 'quote', 'link','audio'
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'hollandex_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
//add theme support for title-tag
add_theme_support( 'title-tag' );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'css/editor-style.css' ) );
}
endif; // hollandex_setup
add_action( 'after_setup_theme', 'hollandex_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/registerhollandexidebar
*/
function hollandex_widgets_init() {
register_sidebar( array(
'name' => __( 'Left Panel Sidebar', 'hollandex' ),
'id' => 'sidebar-1',
'description' => __('The main sidebar that is below the main navigation area','hollandex'),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 1', 'hollandex' ),
'id' => 'sidebar-2',
'description' => __('The 1st sidebar for the footer section','hollandex'),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 2', 'hollandex' ),
'id' => 'sidebar-3',
'description' => __('The 2nd sidebar for the footer section','hollandex'),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 3', 'hollandex' ),
'id' => 'sidebar-4',
'description' => __('The 3rd sidebar for the footer section','hollandex'),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'hollandex_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function hollandex_scripts() {
wp_enqueue_style( 'hollandex-bootsrap-css', get_template_directory_uri() . '/bootstrap/css/bootstrap.min.css' ); //bootsrap css
wp_enqueue_style( 'hollandex-style', get_stylesheet_uri() );
wp_enqueue_style( 'hollandex-font-awesome-css', get_template_directory_uri() . '/font-awesome/css/font-awesome.min.css' ); // font-awesome css
wp_enqueue_script( 'hollandex-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'hollandex-bootstrap-js', get_template_directory_uri() . '/bootstrap/js/bootstrap.min.js', array('jquery'), '3.0' ); //bootsrap
wp_enqueue_script( 'hollandex-custom-js', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true ); //custom js
wp_enqueue_script( 'hollandex-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' );
}
//Google web Fonts
wp_enqueue_style( 'hollandex-ubuntu', '//fonts.googleapis.com/css?family=Ubuntu');
wp_enqueue_style( 'hollandex-Fjalla', '//fonts.googleapis.com/css?family=Fjalla+One');
}
add_action( 'wp_enqueue_scripts', 'hollandex_scripts' );
/**
* Custom template for read more on the excerpt
*/
function hollandex_new_excerpt_more( $more ) {
return '';
}
add_filter( 'excerpt_more', 'hollandex_new_excerpt_more' );
/**
* Get The Post Thumbnail
*/
function hollandex_get_featured_image()
{
$link = get_the_permalink();
echo "";
// $post_format_array = array_search(get_post_format(),array('image','video','link','audio'));
// if(is_single() && count($post_format_array) > 0){
// hollandex_get_post_format_icon();
// return;
// }
if( has_post_thumbnail() )
{
the_post_thumbnail();
}
else
{
hollandex_get_post_format_icon();
}
}
function hollandex_get_post_format_icon(){
$format = get_post_format();
$icon = '';
switch ($format) {
case 'image':
$icon = 'camera';
break;
case 'video':
$icon = 'film';
break;
case 'link':
$icon = 'link';
break;
case 'quote':
$icon = 'quote-left';
break;
case 'audio':
$icon = 'music';
break;
default:
$icon = 'file-text';
break;
}
$return_val = "";
echo $return_val;
}
/**
* 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';
/**
* Implement Custom Theme Options
*/
require get_template_directory() . '/inc/hollandex_theme_customizer.php';
// require get_template_directory() . '/inc/hollandex_theme_options.php';