Viewing 10 replies - 1 through 10 (of 10 total)
  • Theme Author Aigars Silkalns

    (@perper)

    You’d have to use a child theme for that (more on how and why to use a child theme).

    This is probably the most awesome theme ever! Thank you, Per!

    However, can anyone please point out exactly how one can achieve post excerpts on the front page, rather than full posts? Any help would be greatly appreciated!

    http://wordpress.org/extend/themes/blaskan/

    Theme Author Aigars Silkalns

    (@perper)

    Thanks Voxpress!

    1. Create a child theme
    2. Copy all the contents of loop.php in Blaskan to a file called loop-index.php in your child theme
    3. In loop-index.php replace the code on line 51 as described below

    Replace this:

    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'blaskan' ) ); ?>

    With this:

    <?php if ( is_front_page() ): ?>
    	<?php the_excerpt(); ?>
    <?php else: ?>
    	<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'blaskan' ) ); ?>
    <?php endif; ?>

    I replaced this as per your instructions. However, now the body text in each post is shown twice within the same post, on both the front page and on single post pages.

    Screenshot: http://f.cl.ly/items/160X0J3y2F1S021i0P0L/doubletextinsidesinglepost.png

    Thanks again, Per!

    VP

    Please disregard my previous reply, I forgot to properly comment out the original code before adding the modified one 🙂

    Hello, thanks Per for this awesome theme!
    I have created a child theme and am trying to personalize it.
    Is it possible to have the full first post on the front page and then post excerpts from the 2 post onwards?
    Thanks!
    http://www.naiflove.com (still in construction!)

    oolongtea

    (@oolongtea)

    Many thanks Per for this brilliant theme! It´s the best!

    ..and Hi vanessachin! You addressed Per and I believe he soon will give you an answer. However – I would like to take the opportunity to share my solution and at the same time ask anyone for comments on it since I believe there is a smoother solution.

    I did the above thing to line 51 with a few additions:

    <?php if ( is_front_page() && ( count( get_the_category() ) )): ?>
    	<? $thecategories = get_the_category_list( ', ' );
    	$pos = strpos($thecategories,'no_excerpt'); ?>
    	<?php if ($pos == true) : ?>
    		<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'blaskan' ) ); ?>
    	<?php else: ?>
    		<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'blaskan' ), the_title_attribute( 'echo=0' ) ); ?>">
    			<?php the_excerpt(); ?>
    		</a>
    	<?php endif; ?>
    <?php else: ?>
    	<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'blaskan' ) ); ?>
    <?php endif; ?>

    then i did someting similar to what used to be line 56-58. I replaced this:

    <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'blaskan' ), the_title_attribute( 'echo=0' ) ); ?>">
    	<?php _e( 'Continue reading <span class="meta-nav">→</span>', 'blaskan' ); ?>
    </a>

    with this:

    <?php if ( is_front_page() && ( count( get_the_category() ) )): ?>
    	<? $thecategories = get_the_category_list( ', ' );
    	$pos = strpos($thecategories,'no_excerpt'); ?>
    	<?php if ($pos == true) : ?>
    		<?php //nothing ?>
    	<?php else: ?>
    		<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'blaskan' ), the_title_attribute( 'echo=0' ) ); ?>">
    		<?php _e( 'Continue reading <span class="meta-nav">→</span>', 'blaskan' ); ?>
    		</a>
    	<?php endif; ?>
    <?php else: ?>
    	<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'blaskan' ), the_title_attribute( 'echo=0' ) ); ?>">
    		<?php _e( 'Continue reading <span class="meta-nav">→</span>', 'blaskan' ); ?>
    	</a>
    <?php endif; ?>

    On the front page all posts that are assigned to the category “no_excerpt” are fully displayed.

    oolongtea

    (@oolongtea)

    Comment on my post above – “& rarr;” in the code snippets was not supposed to be replaced by a little arrow “→”. I don´t know why that happened. Remove the space after the “&” to get it right.

    Is there any chance excerpts can be enabled as an option in the main theme?

    I really like the theme itself but one of my reasons for using a theme in the first place rather than coding my own site is that I want to focus my time on content rather than programming e.g. learning how to personalise and install a child theme.

    I’ve managed to solve this problem by installing the Auto Excerpt anywhere plugin, which provides excerpts without me having to learn how to play with child themes.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Theme: Blaskan] Can excerpts be enabled on your theme?’ is closed to new replies.