- This topic has 12 replies, 3 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
January 22, 2023 at 10:34 am #2505054
Palash
Hello Support,
I would like to keep the design of my home page post like the screenshot. Please help me.
https://tinyurl.com/2jq3zzoa
Site: https://www.floridahipster.com/
Thanks
PalashJanuary 22, 2023 at 7:11 pm #2505290Fernando Customer Support
Hi Palash,
Is this site – https://www.floridahipster.com/ – your reference site or your actual site?
If it’s a reference, can you provide the link to your site as well?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
January 22, 2023 at 9:23 pm #2505347Palash
Check my site on Private information
January 22, 2023 at 11:39 pm #2505422Fernando Customer Support
To clarify, are you referring to adding breaks/new lines after every sentence for your excerpt?
January 22, 2023 at 11:52 pm #2505428Palash
Maybe Yes,
I want like this https://tinyurl.com/2jq3zzoaJanuary 22, 2023 at 11:59 pm #2505431Palash
It will be the same as a single post but has a limit of text.
January 23, 2023 at 12:06 am #2505437Fernando Customer Support
Try adding this snippet:
add_filter('the_excerpt', function($content){ return str_replace('.', '.<br><br>', $content); }, 10);Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
January 23, 2023 at 12:15 am #2505439Palash
It’s not working and not getting good support from the GeneratePress support team. Always getting the wrong codes and answers. Please test every code before support to the customer. I am waiting for code that really works for my object.
January 23, 2023 at 12:50 am #2505456Fernando Customer Support
I tested that before I sent it. How did you add the code?
Are you using custom excerpts? If you’re using custom excerpts, you can add break lines there.
For regular excerpts, that code should work.
January 23, 2023 at 1:35 am #2505487Palash
I want to show the same as a single post(format, spacing, paragraph, and all) but has a limit of text.
January 23, 2023 at 4:55 am #2505703David
StaffCustomer SupportHi there,
WordPress strips HTML from automatic Excerpts.
The example site you reference is not using auto excerpts.
It is using a the More Tag to define the excerpts:https://wordpress.com/support/wordpress-editor/blocks/more-block/
If you use that method then your excerpts will display with the formatting.
The alternatives:
1. to use an ( out dated ) plugin: https://wordpress.org/plugins/advanced-excerpt/
2. write a PHP function, there are examples of this on Stackexchange.
January 23, 2023 at 7:39 am #2505882Palash
I don’t know about coding. So please give the exact code for this.
January 23, 2023 at 10:03 am #2506169David
StaffCustomer SupportI don’t have the code, and i don’t recommend you try to add code for it. It is a really complicated process as you can see from the Stackexchange link i provided.
You should use the More block for this.
If not, use the Plugin. -
AuthorPosts
- You must be logged in to reply to this topic.