Esempio n. 1
0
function kkthemes_post_view($featured_items = false)
{
    // Posts grid
    beans_add_attribute('beans_post', 'class', 'tm-post-grid uk-grid uk-grid-medium');
    beans_add_attribute('beans_post_image', 'class', 'uk-width-medium-1-2');
    beans_wrap_markup('beans_post_header', 'kkthemes_post_preview', 'div', array('class' => 'tm-post-preview uk-width-medium-1-2'));
    if (is_featured_item() || $featured_items) {
        //More button
        beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-large uk-margin-top');
    } else {
        // Post title
        beans_add_attribute('beans_post_title', 'class', 'uk-h2');
    }
    // Post content
    beans_remove_action('beans_post_content');
    beans_remove_markup('beans_post_body');
    add_action('kkthemes_post_preview_append_markup', 'the_content');
    // Auto generate summary of Post content and read more button
    beans_add_smart_action('the_content', 'kkthemes_post_content');
    // Post meta
    beans_remove_action('beans_post_meta_tags');
    beans_remove_action('beans_post_meta_categories');
    // Post image
    beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image');
}
Esempio n. 2
0
function kkthemes_archive_title()
{
    $tag_style = '';
    $header_image = get_header_image();
    if (!empty($header_image)) {
        $tag_style = 'background-image: url(' . esc_url($header_image) . ');';
    }
    ?>
	<div class="uk-panel uk-panel-box uk-panel-space uk-text-large uk-text-center tm-branded-panel uk-margin-large-bottom" style="<?php 
    echo $tag_style;
    ?>
">
		<h1 class="uk-article-title" itemprop="headline">
			<?php 
    single_cat_title('') || post_type_archive_title('');
    ?>
		</h1>
		<?php 
    if (is_featured_item()) {
        $post_type = get_post_type();
        echo '<p>' . get_post_type_object($post_type)->description . '</p>';
    } else {
        echo category_description();
    }
    ?>
	</div>
<?php 
}
Esempio n. 3
0
function is_main_archive()
{
    return is_featured_item() || is_category('blog');
}
Esempio n. 4
0
function kkthemes_modify_read_more()
{
    if (is_featured_item()) {
        return __('Learn more', 'kkthemes');
    } else {
        return __('Read more', 'kkthemes');
    }
}