Comments on: How to Create an Excerpt From a Post Without an Excerpt and Limit It by Character Count https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/ A hub for advanced WordPress users, developers & savvy business owners. Tue, 08 Dec 2020 09:27:04 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Lea Cohen https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22071 Tue, 08 Dec 2020 09:27:04 +0000 https://wpshout.com/?p=22114#comment-22071 In reply to Jefus.

Hi Jefus,
I’m glad to hear that the code has helped you 🙂
Regarding your question, it’s hard for me to answer without seeing your code. However, off the top of my head I would check where you’re trying to use is_category, because if run too early in the page load lifecycle, it doesn’t have sufficient information to return the expected result.

]]>
By: Lea Cohen https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22070 Tue, 08 Dec 2020 09:22:01 +0000 https://wpshout.com/?p=22114#comment-22070 In reply to Navin Rao.

Thank you for the kind words! Glad you found it useful 🙂

]]>
By: Jefus https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22069 Thu, 03 Dec 2020 08:25:11 +0000 https://wpshout.com/?p=22114#comment-22069 Can you explain how one would extract a known class included in the the post that can be added to the excerpt, but only for a single category. Example class=”price” This needs to be appended to the end of the excerpt.
I have tried several methods I’ve found from Google search, so far your example (with some additional code) is the only one that has worked.
Except that it tries to find the price in all categories and breaks the site. Adding a test for is_category didn’t work so I’m stumped.

Thank you for the post/tutorial it has been very helpful.

]]>
By: Lea Cohen https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22068 Sat, 21 Nov 2020 17:46:56 +0000 https://wpshout.com/?p=22114#comment-22068 In reply to Adiel.

Thank you. Glad you enjoyed, Adiel

]]>
By: Adiel https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22067 Sun, 15 Nov 2020 16:50:38 +0000 https://wpshout.com/?p=22114#comment-22067 Excellent!
Thank you, Lea Cohen.

]]>
By: Navin Rao https://wpshout.com/how-to-create-an-excerpt-from-a-post-without-an-excerpt-and-limit-it-by-character-count/#comment-22066 Mon, 09 Nov 2020 22:28:51 +0000 https://wpshout.com/?p=22114#comment-22066 This sounds interesting. and a great option for all the custom website users. I will definitely try to create a custom excerpt for one of my new websites.

Thanks for the awesome code. Bunch of thanks! 🙂

]]>