parent_theme );
}
$theme_version = $theme_info->display( 'Version' );
return $theme_version;
}
endif;
function adeq_setup(){
register_nav_menus( array(
'primary' => __( 'Primary', 'adeq' ),
'bottom' => __( 'Bottom', 'adeq' ),
) );
add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
function special_nav_class($classes, $item){
if( in_array('current-menu-item', $classes) ){
$classes[] = 'active ';
}
return $classes;
}
add_theme_support( 'automatic-feed-links' );
$argsbg = array(
'default-color' => '#ffffff',
'default-image' => '%1$s/images/1.png',
);
add_theme_support( 'custom-background', $argsbg );
// Add featured image support
add_theme_support('post-thumbnails');
add_image_size('all-post-thumbnail');
// Add post type support
add_theme_support( 'post-formats', array(
'video', 'link'
) );
$header = array(
'default-color' => '#333',
);
add_theme_support( 'custom-header', $header);
function theme_functions() {
add_theme_support( 'title-tag' );
}
}
add_action( 'after_setup_theme', 'adeq_setup' );
function toward_load_scripts_styles(){
$template_dir = get_template_directory_uri();
$theme_version = adeq_get_theme_version();
wp_enqueue_style( 'toward-stylesheet', $template_dir, array(), $theme_version);
wp_enqueue_style( 'toward-bootstrap', $template_dir . '/css/bootstrap.css', array(), $theme_version );
wp_enqueue_style( 'toward-main', $template_dir . '/css/main.css', array(), $theme_version );
wp_enqueue_style( 'toward-responsive', $template_dir . '/css/responsive.css', array(), $theme_version );
wp_enqueue_style( 'toward-animate', $template_dir . '/css/animate.css', array(), $theme_version );
wp_enqueue_style( 'toward-color', $template_dir . '/css/colors/color.css', array(), $theme_version );
wp_enqueue_style( 'toward-fontello', $template_dir . '/css/fontello.css', array(), $theme_version );
//wp_deregister_script( 'jquery.Min' );
wp_register_script( 'jquery.Min', $template_dir . '/js/jquery.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.Min' );
//wp_deregister_script( 'jquery.migrate' );
wp_register_script( 'jquery.migrate', $template_dir . '/js/jquery.migrate.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.migrate' );
//wp_deregister_script( 'jquery.modernizrr' );
wp_register_script( 'jquery.modernizrr', $template_dir . '/js/modernizrr.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.modernizrr' );
//wp_deregister_script( 'jquery.bootstrap' );
wp_register_script( 'jquery.bootstrap', $template_dir . '/js/bootstrap.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.bootstrap' );
//wp_deregister_script( 'jquery.fitvids' );
wp_register_script( 'jquery.fitvids', $template_dir . '/js/jquery.fitvids.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.fitvids' );
//wp_deregister_script( 'jquery.carousel' );
wp_register_script( 'jquery.carousel', $template_dir . '/js/owl.carousel.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.carousel' );
//wp_deregister_script( 'jquery.lightbox' );
wp_register_script( 'jquery.lightbox', $template_dir . '/js/nivo-lightbox.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.lightbox' );
//wp_deregister_script( 'jquery.isotope' );
wp_register_script( 'jquery.isotope', $template_dir . '/js/jquery.isotope.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.isotope' );
//wp_deregister_script( 'jquery.appear' );
wp_register_script( 'jquery.appear', $template_dir . '/js/jquery.appear.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.appear' );
//wp_deregister_script( 'jquery.count' );
wp_register_script( 'jquery.count', $template_dir . '/js/count-to.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.count' );
//wp_deregister_script( 'jquery.textillate' );
wp_register_script( 'jquery.textillate', $template_dir . '/js/jquery.textillate.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.textillate' );
//wp_deregister_script( 'jquery.lettering' );
wp_register_script( 'jquery.lettering', $template_dir . '/js/jquery.lettering.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.lettering' );
//wp_deregister_script( 'jquery.easypiechart' );
wp_register_script( 'jquery.easypiechart', $template_dir . '/js/jquery.easypiechart.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.easypiechart' );
//wp_deregister_script( 'jquery.nicescroll' );
wp_register_script( 'jquery.nicescroll', $template_dir . '/js/jquery.nicescroll.min.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.nicescroll' );
//wp_deregister_script( 'jquery.parallax' );
wp_register_script( 'jquery.parallax', $template_dir . '/js/jquery.parallax.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.parallax' );
//wp_deregister_script( 'jquery.cusscript' );
wp_register_script( 'jquery.cusscript', $template_dir . '/js/script.js', array(), $theme_version, true);
wp_enqueue_script( 'jquery.cusscript' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'toward_load_scripts_styles' );
function adeq_widgets_init() {
register_sidebar( array(
'name' => __( 'Widget Area', 'adeq' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar.', 'adeq' ),
'before_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Right Side Area', 'adeq' ),
'id' => 'sidebar-2',
'description' => __( 'Add widgets here to appear in your sidebar.', 'adeq' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
) );
}
add_action( 'widgets_init', 'adeq_widgets_init' );
function adt_serene_customize_register( $wp_customize ) {
$wp_customize->add_section( 'adt_theme_settings' , array(
'title' => __( 'Theme Settings', 'adeq' ),
'priority' => 60,
) );
$wp_customize->add_setting( 'accent_color', array(
'default' => '#fbad18',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting( 'text_accent_color', array(
'default' => '#555555',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting( 'page_accent_color', array(
'default' => '#555555',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting( 'footer_accent_color', array(
'default' => '#555555',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent_color', array(
'label' => __( 'Buttons & icons Background Color', 'adeq' ),
'section' => 'adt_theme_settings',
'settings' => 'accent_color',
) ) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_accent_color', array(
'label' => __( 'Active Menu Text Color', 'adeq' ),
'section' => 'adt_theme_settings',
'settings' => 'text_accent_color',
) ) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_accent_color', array(
'label' => __( 'All Page Link Color', 'adeq' ),
'section' => 'adt_theme_settings',
'settings' => 'page_accent_color',
) ) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_accent_color', array(
'label' => __( 'Footer Background Color', 'adeq' ),
'section' => 'adt_theme_settings',
'settings' => 'footer_accent_color',
) ) );
$wp_customize->add_setting( 'facebook_url', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( 'facebook_url', array(
'label' => __( 'Facebook Profile URL', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
$wp_customize->add_setting( 'twitter_url', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( 'twitter_url', array(
'label' => __( 'Twitter Profile URL', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
$wp_customize->add_setting( 'dribbble_url', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( 'dribbble_url', array(
'label' => __( 'Dribbble Profile URL', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
$wp_customize->add_setting( 'contact_number_url', array(
'default' => '000-000-0000',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'contact_number_url', array(
'label' => __( 'Phone Number', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
$wp_customize->add_setting( 'email_url', array(
'default' => 'info@yourcompany.com',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_email',
) );
$wp_customize->add_control( 'email_url', array(
'label' => __( 'Email', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
$wp_customize->add_setting( 'powered', array(
'default' => '@ 2016 ADEQ - All Rights Reserved - THEME SHARED ON DistinctCoder.com',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'powered', array(
'label' => __( 'Powered by', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'text',
) );
// check box
$wp_customize->add_setting( 'show_content_social', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'show_content_social', array(
'label' => __( 'Hidden Social Link', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'checkbox',
) );
$wp_customize->add_setting( 'show_content_dis', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'show_content_dis', array(
'label' => __( 'Hidden Site Title Description', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'checkbox',
) );
$wp_customize->add_setting( 'left_sideber', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'left_sideber', array(
'label' => __( 'Hidden Right Sideber', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'checkbox',
) );
$wp_customize->add_setting( 'two_col_post', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'two_col_post', array(
'label' => __( 'Two Columns Blog Post', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'checkbox',
) );
$wp_customize->add_setting( 'three_col_post', array(
'default' => '',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'three_col_post', array(
'label' => __( 'Three Columns Blog Post', 'adeq' ),
'section' => 'adt_theme_settings',
'type' => 'checkbox',
) );
}
add_action( 'customize_register', 'adt_serene_customize_register' );
function serene_add_customizer_css(){ ?>
Home';
if (!is_home()) {
echo '';
echo " ";
if (is_category() || is_single()) {
the_category('title_li=');
if (is_single()) {
echo " ";
the_title();
}
} elseif (is_page()) {
echo the_title();
}
}
}
// Customize excerpt word count length
function custom_excerpt_length() {
return 60;
}
add_filter('excerpt_length', 'custom_excerpt_length');
if ( ! function_exists( 'et_custom_comments_display' ) ) :
function et_custom_comments_display( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment; ?>