[Plugin: Site Layout Customizer] Suggestion: Excerpt improvements
-
Thanks for the easy-to-use and customizable plugin. I know have it otherwise neatly set up, but the current settings don’t allow to use excerpts that would suit the site in question. These small changes would do the trick:
- Respect the Read More tag <!–more–> when choosing the excerpt. In plugin version 1.7, the place to do this could be right before the last closing bracket on lines 1402-1406:
if (strlen($post->post_excerpt) > 1){ $t = $post->post_excerpt; }else{ $t = $post->post_content; }
The thing to do is to remove everything from $post->post_content from <!–more–> to the end.
- An option to remove hyperlinks from excerpts. This is crucial for example sites that use hyperlinks early in the posts, for example to utilize the auto-embed feature in WordPress 3.3. A single line with a https://youtu.be/… link is turned into an embedded video when viewing the post, but looks out of place as a text in an excerpt.
- An option to keep line breaks. Whether the content is poems or more usual pieces of writing, in many sites the formatting of the line breaks is crucial also in the excerpts.
- An option to cut the excerpt at the nearest space or line break. In a website where hyperlinks would be acceptable parts of the excerpt, the intent certainly is not to break in the middle of one. In a website that contains poems this would also be needed, because even a long post might not contain a single period.
- It might be useful to specify the length of excerpts in words instead of characters. WordPress default is that excerpts are 55 words regardless of their length.
- An option to keep some of the formatting. A case website would like to keep all < em > tags in the excerpts. Out of these I listed, this is the lowest priority, and looking at the code it seems like it takes a bit more thought to implement, but in case it is implemented, the best solution could be a checkbox list of which formatting tags to keep.
These options 2 to 6 could be best to be in context of each layout instead of the overall plugin settings. The excerpt options could be different for layouts that contain posts from totally different categories, for example.
https://www.ads-software.com/extend/plugins/site-layout-customizer/
- Respect the Read More tag <!–more–> when choosing the excerpt. In plugin version 1.7, the place to do this could be right before the last closing bracket on lines 1402-1406:
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Plugin: Site Layout Customizer] Suggestion: Excerpt improvements’ is closed to new replies.