for posts and comments. add_theme_support( 'automatic-feed-links' ); /* * Enable support for Post Formats. */ add_theme_support( 'post-formats', array( 'gallery','video', 'audio', 'link','quote' ) ); /* * 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' ) ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /** * dynamic social link * */ function th_social_links(){ ?> <ul> <?php if($f_link = get_theme_mod('f_link')) : ?><li><a target='_blank' href="<?php echo $f_link; ?>" ><i class='fa fa-facebook'></i></a></li><?php endif; ?> <?php if($t_link = get_theme_mod('t_link')) : ?><li><a target='_blank' href="<?php echo $t_link; ?>" ><i class='fa fa-google-plus'></i></a></li><?php endif; ?> <?php if($g_link = get_theme_mod('g_link')) : ?><li><a target='_blank' href="<?php echo $g_link; ?>" ><i class='fa fa-linkedin'></i></a></li><?php endif; ?> <?php if($l_link = get_theme_mod('l_link')) : ?><li><a target='_blank' href="<?php echo $l_link; ?>" ><i class='fa fa-pinterest'></i></a></li><?php endif; ?> <?php if($p_link = get_theme_mod('p_link')) : ?><li><a target='_blank' href="<?php echo $p_link; ?>" ><i class='fa fa-twitter'></i></a></li><?php endif; ?> </ul> <?php } // home page post meta function th_home_post_meta($search,$default=false){ $home_post_meta = get_theme_mod('home_post_meta'); $value = (!empty($home_post_meta) && !empty($home_post_meta[0]))?in_array($search, $home_post_meta):$default; return $value; } // single page post meta function th_single_post_meta($search,$default=false){ $home_post_meta = get_theme_mod('single_post_meta'); $value = (!empty($home_post_meta) && !empty($home_post_meta[0]))?in_array($search, $home_post_meta):$default; return $value; } global $grid_layout; $grid_layout = get_theme_mod('dynamic_grid','standard-layout'); ?>