• Resolved moneysloths

    (@moneysloths)


    Hi,

    I love the Kale theme! Hoping you can help with the following issues.

    The current blog feed display format for Kale Theme is either 2 Small Posts Followed by 1 Full or Small Image and Excerpt, 2 in a Row.

    Is there any way to have the blog feed show posts as 1 in a row, with a longer excerpt and the featured image along the right side (right aligned) to the excerpt? My featured image would be more vertical, like a Pinterest photo.

    Also, is there anyway to change the “[…]” at the end of the excerpt to say “Read More”?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    Thank you for getting in touch with us.

    In order to change blog feed layout you need to customize theme files in Child Theme.

    To change excerpt please add the following code to functions.php in Child Theme:

    function kale_excerpt_more($more) {
    	global $post;
    	return '<a href="'. get_permalink($post->ID) . '"> ' . __( 'Read more', 'kale' ) . '</a>';
    }
    add_filter('excerpt_more', 'kale_excerpt_more');

    Hope that helps. Thank you for your time in this.

    Best regards

    Thread Starter moneysloths

    (@moneysloths)

    I feel silly for asking, but is this possible to do on a wordpress.com site hosted on Bluehost? My site runs the Kale theme, but it’s not through www.ads-software.com.

    Theme Author lyrathemes

    (@lyrathemes)

    No worries, @moneysloths! If your site is running on Bluehost, then it runs the WordPress version from www.ads-software.com.

    Thread Starter moneysloths

    (@moneysloths)

    Is a style.css sheet required in a Child Theme? Or can I just create a functions.php in a Child Theme and put in the code that @jarektheme provided?

    Theme Author lyrathemes

    (@lyrathemes)

    If you do not want style changes, you do not necessarily need rules in the style sheet. But a style.css file is required in the child theme because it contains the name and the declaration that it is a child theme of the specific parent theme.

    Thread Starter moneysloths

    (@moneysloths)

    Hi Lyrathemes/Jarektheme,

    I’m having some trouble with the Child theme set up. When I activate the child theme, the “Read More” option works, but the theme of the kale theme gets messed up.

    I created this style.css in my file manager:

    /*
     Theme Name:   Kale Child
     Theme URI:    https://example.com/kale-child/
     Description:  Kale Child Theme
     Author:       John Doe
     Author URI:   https://example.com
     Template:     kale
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  https://www.gnu.org/licenses/gpl-2.0.html
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  kale-child
    */

    Separately, I created this functions.php file:

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'kale-style'; // This is 'kale-style' for the Kale theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    
    function kale_excerpt_more($more) {
    	global $post;
    	return '<a>ID) . '"> ' . __( 'Read more', 'kale' ) . '</a>';
    }
    add_filter('excerpt_more', 'kale_excerpt_more');
    
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    
    ?>

    Also, is it easy to have the excerpt be longer? In other words, can I extend the length of the excerpt in front of “read more”?

    • This reply was modified 7 years, 8 months ago by moneysloths.

    Hi @moneysloths,

    Please modify your functions.php file to include also the couple of required styles:

    function my_theme_enqueue_styles() {
    wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' );
    	wp_register_style('bootstrap-select', get_template_directory_uri() . '/assets/css/bootstrap-select.min.css' );
    	wp_register_style('font-awesome', get_template_directory_uri().'/assets/css/font-awesome.min.css' );
    	wp_register_style('owl-carousel', get_template_directory_uri().'/assets/css/owl.carousel.css' );
    
    	$deps = array('bootstrap', 'bootstrap-select', 'font-awesome', 'owl-carousel');
    	wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css', $deps );
    }

    To change excerpt length add this functions to your Child Theme:

    function kale_excerpt_length( $length ) {
    	return 60;
    }
    add_filter( 'excerpt_length', 'kale_excerpt_length', 999 );

    Hope that helps.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Blog Feed Display Format – Single Post’ is closed to new replies.