• Resolved more.than.obsidian

    (@morethanobsidian)


    Hi, thanks for the great theme! I really love the layout of it and am trying it out currently.
    I have set my home page to be the “lastest posts” page. I have noticed, however, that the excerpts are not showing the containing posts correctly:
    1. Content pictures are not shown in the excerpt.
    2. Line breaks are gone.

    Please see as example the first post in the website:
    https://hauptfachleben.com/wordpress/

    This is how this post is supposed to look like when you open the post independently:
    https://hauptfachleben.com/wordpress/?p=23

    You can see that the images in the post are completely blended out on the main page. Also, the line breaks inside the post are also flattened out.
    (I write in Chinese and use very often shift+enter to break sentences and enter to break paragraphs. This makes the content easier to read. With the break lines gone in the excerpt, the content is now dreadfully long without any breaks in between, and I’m sure none of my visitors would be tempted to click into the article….)

    Is there a way to make these excerpts showing the images and line breaks correctly as in the single posts?

    Thank you so much!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • jerryscg

    (@jerryscg)

    Hello more.than.obsidian,

    Thanks on reporting the issues you have with post excerpt. The links to your website are not working so it would be great if you resolve issues with links so i can check on your website what’s going on.

    Anyway i can modify little the excerpt so you will be able to use images & all other tags from content editor.

    You can expect those changes in next theme update.

    Regards

    Thread Starter more.than.obsidian

    (@morethanobsidian)

    Sorry, I was tweaking a little bit the php data and the theme crashed as a result. Now the site should be functioning again.

    And thanks for the quick reply! When would probably the next theme update happen? (Or are there any quick fixes I can do to my theme so that my blog can go online in the next few days?)

    Thank you!

    jerryscg

    (@jerryscg)

    The quick fix until update is out should be next for you:

    1. Go to wp-content/themes/agama/framework/blog/list/

    2. Edit loop.php file and change:

    <?php the_excerpt(); ?>

    to

    <?php the_content(); ?>

    on line 60.

    But this will also display full post on blog loop page, so you can limit it to show any number of words by doing next:

    Change:

    <?php the_content(); ?>

    to:

    <?php
       $content = get_the_content();
       echo substr( $content, 0, 100 );
    ?>

    Now the content will display only first 100 words.

    Regards

    Thread Starter more.than.obsidian

    (@morethanobsidian)

    Thank you so much for helping me locate this line of code!!

    The code
    <?php the_content(); ?>
    worked wonderfully and recognized all the line breaks.

    The second code,
    <?php
    $content = get_the_content();
    echo substr( $content, 0, 100 );
    ?>
    , had however ignored the line breaks again.
    Is it possible to keep the line breaks with the second code?

    Also, is it possible to set this echo code to fetch the first 5 lines or the first 2 paragraphs?
    (I suppose this is more of a coding question…..)

    Thread Starter more.than.obsidian

    (@morethanobsidian)

    My site is currently set to
    echo substr( $content, 0, 500 )
    if you would like to see how it looks like.

    https://hauptfachleben.com/wordpress/

    jerryscg

    (@jerryscg)

    Marking thread as Resolved, if you have any questions let me know.

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Post excerpts not displaying content loyaly on "latest posts" page’ is closed to new replies.