-
Hi there,
I imported the design named “info” in site library.
For the front page, there are sections showing excerpt of each post.I tried to adjust the length of excerpt here:
Headline/Dynamic Data/Excerpt length
However, it doesn’t work.My posts were written in Traditional Chinese characters. Does it also work for Traditional Chinese characters?
thanks -
Alvind
Hi there,
You can try the solution in this topic:
https://generatepress.com/forums/topic/blog-setting-excerpt-word-count-doesnt-work-on-other-language/ -
Hi there,
I also read this.
https://docs.generatepress.com/article/fixing-wordpress-excerpts-word-count-in-other-languages/Questions:
1.coudl we still adjust the “excerpt length” on “Headline/Dynamic Data/Excerpt length” field?
2.the setting for “more” link seems disabled and with a default setting if I use the snippet code abovecould we customize “more” link?
thanks
-
Alvind
Yes, you should be able to adjust the excerpt length from that location.
Could you provide the site link so we can check?
-
I captured the screen , please view the video in private information section.
two questions:
1. excerpt length:
This is fixed by the snippet code, right?
We are not able to adjust it from the location of the field.2. “more” link.
There is one default more link(gray color) after adding the snippet code.
Besides, we are not able to adjust it anymore from the setting on the right side.thanks
-
Hi there,
1. that is correct, the snippet sets the length.
2. change the snippet to:
function dez_filter_chinese_excerpt( $output ) { global $post; //check if its chinese character input $chinese_output = preg_match_all("/\p{Han}+/u", $post->post_content, $matches); if($chinese_output) { $output = sprintf( '%1$s', mb_substr( $output, 0, 50 ) ); } return $output; } add_filter( 'get_the_excerpt', 'dez_filter_chinese_excerpt' );
This will just return the excerpt and NOT the Read More Button
-
Hi there,
thanks for the new snippet.
I tried to use the new codes. It won’t show the “more” link as the previous one.
When I adjust the more link in the dynamic data section, it looks ok while editing the page.
If I save it and then view the page, whatever I set for “more” link can’t be displayed. (2nd link shared below)anything I missed?
-
Can you make sure there’s a link source selected for the read more link?
https://app.screencast.com/5c4Qelq2nQUuH -
Hi there,
Here are some conditions to share:
Link source selected ( single post)>>
edit page: show “more” link text
view page: show only the excerpt and it can link to the single postLink source not-selected>>
edit page: show “more” link
view pate: show only the excerptThe issue is:
As long as we switch to the view page, then “more” link is gone. -
Link source not-selected>>
I said “Can you make sure there’s a link source selected for the read more link”
So can you do that first?
-
Yes.
I did select a link source. There is a link source selected for the read more link.
However, there is no “read more link” text displayed while viewing the page.
You may check the link below -
Hmmm… there are two options:
Option 1
We add back the read more link in the PHP. We can assists with restyling it and changing the label text if you want.Option 2
Un check the Use default more link in the excerpt.
And add separate button block for the Read More. Then you can customize this as you require.Let me know if either option is ok
-
THANK YOU.
I will try both methods on my side and see which one works for me.
-
Let us know how you get on.
- You must be logged in to reply to this topic.