• Resolved shalini21

    (@shalini21)


    Hi,
    1. I would like to show excerpts for the posts in front page. How do I add ?
    2. Posts in front page are not orderly in desktop, but looks fine in mobile.
    Please help.

    • This topic was modified 7 years, 3 months ago by shalini21.

    The page I need help with: [log in to see the link]

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

    Thank you for getting in touch with us.

    1. Elara does support displaying excerpt but only on posts without featured image. You can easily modify this by replacing this function in wp-content/themes/elara/inc/template-tags.php:

    if ( ! function_exists( 'elara_feed_entry_excerpt' ) ) :
    	/**
    	 * Entry Excerpt
    	 * @return string Prints current post title, inside link for archives and without link for singles
    	 */
    	function elara_feed_entry_excerpt() {
    		$elara_example_content = elara_get_option( 'elara_example_content' );
    		// if ( ! is_category() ) :
    			if ( ! $elara_example_content && ! has_post_thumbnail() ) : ?>
    				<div class="entry-summary"><?php the_excerpt(); ?></div>
    			<?php endif;
    		// endif;
    	}
    endif;

    with this:

    if ( ! function_exists( 'elara_feed_entry_excerpt' ) ) :
    	/**
    	 * Entry Excerpt
    	 * @return string Prints current post title, inside link for archives and without link for singles
    	 */
    	function elara_feed_entry_excerpt() {
    		$elara_example_content = elara_get_option( 'elara_example_content' );
    		// if ( ! is_category() ) :
    		add_filter( 'excerpt_more', 'elara_excerpt_more' ); ?>
    				<div class="entry-summary"><?php the_excerpt(); ?></div>
    			<?php remove_filter( 'excerpt_more', 'elara_excerpt_more' );
    		// endif;
    	}
    endif;

    Please note, that all changes will be lost after next theme update so you you’ll have to add them again or use Child theme

    2. I had a look at posts on front page on mobile and desktop and couldn’t find that issue. Could you provide more details, perhaps send some screenshots of this?

    Kind regards

    Thread Starter shalini21

    (@shalini21)

    Hi,

    1. I modified the file and it works fine.
    2. Sorry. I could not recreate that issue.

    Thank you so much!

    Thread Starter shalini21

    (@shalini21)

    I’m marking as resolved!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Show Excerpt’ is closed to new replies.