__( 'Primary Menu', 'phpkida' ), 'footer-menu1' => __( 'Footer Menu1', 'phpkida' ), 'footer-menu2' => __( 'Footer Menu2', 'phpkida' ), 'footer-menu3' => __( 'Footer Menu3', 'phpkida' )));
}
add_action( 'init', 'register_theme_menus' );
/**************************************************
###### Initialize after Setup Theme
**************************************************/
add_action( 'after_setup_theme', 'phpkida_theme_setup' );
function phpkida_theme_setup() {
add_theme_support( 'html5', array( 'search-form' ) );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
load_theme_textdomain( 'phpkida', get_template_directory() . '/languages' );
add_theme_support( 'automatic-feed-links' );
/**************************************************
###### Enable support for HTML5 markup
**************************************************/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support( 'post-formats', array(
'aside',
'gallery',
'link',
'image',
'quote',
'status',
'video',
'audio',
'chat'
) );
add_theme_support( 'custom-background', apply_filters( 'the_minimal_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
add_theme_support( 'post-formats', array( 'aside') );
// In your theme single.php, page.php or custom post type
if ( has_post_format( 'quote' ) ) {
echo 'This is a quote.';
}
}
/**************************************************
###### Custome Logo
**************************************************/
function theme_prefix_setup() {
add_theme_support( 'custom-logo', array(
'height' => 100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
'header-text' => array( 'site-title', 'site-description' ),
) );
}
add_action( 'after_setup_theme', 'theme_prefix_setup' );
/**************************************************
##### theme styles
**************************************************/
function phpkida_wp_theme_styles() {
wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css', '', 'all' );
}
add_action( 'wp_enqueue_scripts', 'phpkida_wp_theme_styles' );
/**************************************************
###### Widgets
**************************************************/
function phpkida_wp_create_widget() {
register_sidebar( array(
'name' => __( 'Blog Sidebar', 'phpkida' ),
'id' => 'blog',
'description' => __( 'Displays on the right of the blog posts', 'phpkida' ),
'before_widget' => '
',
'before_title' => ''
) );
register_sidebar( array(
'name' => __( 'Single Sidebar', 'phpkida' ),
'id' => 'single',
'description' => __( 'Displays on the right of the blog single post', 'phpkida' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array(
'name' => __( 'Footer 1', 'phpkida' ),
'id' => 'footer-1',
'description' => __( 'Displays on the footer section one', 'phpkida' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array(
'name' => __( 'Footer 2', 'phpkida' ),
'id' => 'footer-2',
'description' => __( 'Displays on the footer section two', 'phpkida' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array(
'name' => __( 'Footer 3', 'phpkida' ),
'id' => 'footer-3',
'description' => __( 'Displays on the footer section three', 'phpkida' ),
'before_widget' => '',
'before_title' => ''
) );
}
add_action( 'widgets_init', 'phpkida_wp_create_widget' );
/**************************************************
###### Theme customiz
**************************************************/
require get_template_directory() . '/inc/customizer.php';
/**************************************************
######Search form widget
**************************************************/
require get_template_directory() . '/inc/widgets/search.php';
/**************************************************
######Custom Comments
**************************************************/
require get_template_directory() . '/inc/comments.php';
/**************************************************
###### Pagination
**************************************************/
require get_template_directory() . '/inc/pagination.php';
/**************************************************
###### Popular Posts
**************************************************/
require get_template_directory() . '/inc/widgets/popular-posts.php';
/**************************************************
###### Recent posts
**************************************************/
require get_template_directory() . '/inc/widgets/recent-posts.php';
/**************************************************
###### Facebook Like Box
**************************************************/
require get_template_directory() . '/inc/widgets/facebook.php';
/**************************************************
###### About Me Box
**************************************************/
require get_template_directory() . '/inc/widgets/about-me.php';
/**************************************************
###### REMOVE EMOJI ICONS
**************************************************/
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
/**************************************************
###### Support Thumbnails
**************************************************/
add_theme_support( 'post-thumbnails' );
the_post_thumbnail('thumbnail');
// desable auto thumbnail creation
function wp_filter_image_sizes( $sizes) {
unset( $sizes['medium']);
unset( $sizes['768x358']);
unset( $sizes['768x300']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'wp_filter_image_sizes');