Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1432299
Custom excerpt length not working
Closed

Comments

  • manonvanos started the conversation

    Hi,

    I just switched my website to Soledad and am loving it so far!

    I have one question about the excerpt lengt: Under 'Other Layout Option' I typed in 20, so I would expect that the excerpt under my posts on the homepage would only have 20 words. However, nothing changes when I apply 20 words to it. As you can see on my website, the full excerpt is still showing which is much more than 20 words. 

    How can I change this?

    Thanks.

    Kind regards,
    Manon van Os

  •  2,699
    PenciDesign replied

    Hi,

    This issue caused by you did fill your custom excerpt to excerpt box in edit posts screen.

    And when you do that, wordpress doesn't supports cut the excerpt.


    Best Regards,

    PenciDesign

  • manonvanos replied

    Hi,

    Thanks for the reply.

    I deleted my post excerpt in the edit post screen for the blogs 'Travel Story | De paradijselijke Gili eilanden' and 'Travel Story | Het onontdekte IndonesiĆ« in Lombok'. 

    But as you can see on my website, the excerpt for the first blog (standard layout) is way too short and with at the second blog (grid layout) there isn't even an excerpt showing!

    I just want it to show 20 words in the grid layout, and a bit more words on the standard layout.

    Thanks

  •  2,699
    PenciDesign replied

    Hi,

    Yeah, because you've built your posts by use shortcodes from Visual Composer - and wordpress will remove all shortcodes in the excerpt - so, the excerpt doesn't display.

    If you want to do that, I think you need to edit the file in this theme.

    Please replace this code on this image to this code:

    <?php echo wp_trim_words( get_the_excerpt(), 20, '...' ); ?>

    This will make your excerpt auto trim for 20 words, this will work even you fill custom excerpt to your excerpt box.

    Hope this help,

    Best Regards,

    PenciDesign

  • manonvanos replied

    Hi,

    Thank you so much, that worked. 

    How can I now change te excerpt from the standard layout as well, so that it's not so short? I want that to show more words than what it is now.

    Thanks

  • manonvanos replied

    Never mind, I already found a solution!