ID ) ){
$classes[] = 'no-featured-image';
}
return $classes;
}
add_filter( 'post_class', 'halcyon_post_classes' );
/**
* Callback for Social Links
*/
function halcyon_social_cb(){
$facebook = get_theme_mod( 'halcyon_facebook' );
$twitter = get_theme_mod( 'halcyon_twitter' );
$pinterest = get_theme_mod( 'halcyon_pinterest' );
$instagram = get_theme_mod( 'halcyon_instagram' );
$rss = get_theme_mod( 'halcyon_rss' );
$dribble = get_theme_mod( 'halcyon_dribble' );
$linkedin = get_theme_mod( 'halcyon_linkedin' );
$google_plus = get_theme_mod( 'halcyon_google_plus' );
if( $facebook || $twitter || $instagram || $google_plus || $pinterest || $linkedin || $rss || $dribble ){
?>
< id="comment-">
'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'post__in' => $sticky_post,
'ignore_sticky_posts' => 1
) );
if( $sticky_post && $qry->have_posts() ){ ?>
have_posts()){
$qry->the_post();
if( has_post_thumbnail() ){
$categories_lists = get_the_category();
if( $categories_lists && halcyon_categorized_blog() ){
$categories = '';
$i = 1;
foreach( $categories_lists as $cat ){
$categories .= $cat->name;
if( $i < count( $categories_lists ) ){
$categories .= __( ', ', 'halcyon' );
}
$i++;
}
}?>
-
is_home() && $query->is_main_query() && $excludes ) {
$query->set( 'post__not_in', $excludes );
$query->set( 'ignore_sticky_posts', true );
}
}
add_filter( 'pre_get_posts', 'halcyon_exclude_posts' );
/**
* Callback function for Featured Post
*/
function halcyon_featured_post_cb(){
$title = get_theme_mod( 'halcyon_featured_section_title' );
$post_one = get_theme_mod( 'halcyon_featured_post_one' );
$post_two = get_theme_mod( 'halcyon_featured_post_two' );
$post_three = get_theme_mod( 'halcyon_featured_post_three' );
if( $post_one || $post_two || $post_three ){
$featured_posts = array( $post_one, $post_two, $post_three );
$featured_posts = array_diff( array_unique( $featured_posts ), array('') );
$qry = new WP_Query( array(
'post_type' => 'post',
'posts_per_page' => -1,
'post__in' => $featured_posts,
'orderby' => 'post__in',
'ignore_sticky_posts' => true
) );
if( $qry->have_posts() ){
?>
' . esc_html( $title ) . ''; ?>
have_posts() ){
$qry->the_post();
$categories_lists = get_the_category();
?>
';
echo wp_strip_all_tags( $custom_css );
echo '';
}
}
add_action( 'wp_head', 'halcyon_custom_css', 100 );
if ( ! function_exists( 'halcyon_excerpt_more' ) && ! is_admin() ) :
/**
* Replaces "[...]" (appended to automatically generated excerpts) with ... *
*/
function halcyon_excerpt_more() {
return ' … ';
}
add_filter( 'excerpt_more', 'halcyon_excerpt_more' );
endif;
if ( ! function_exists( 'halcyon_excerpt_length' ) ) :
/**
* Changes the default 55 character in excerpt
*/
function halcyon_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'halcyon_excerpt_length', 999 );
endif;
/**
* Return sidebar layouts for pages
*/
function halcyon_sidebar_layout(){
global $post;
if( get_post_meta( $post->ID, 'halcyon_sidebar_layout', true ) ){
return get_post_meta( $post->ID, 'halcyon_sidebar_layout', true );
}else{
return 'right-sidebar';
}
}