getchaos
(Michael)
4. August 2020 um 11:56
1
Hi zusammen,
wir nutzen bei uns Podlove mit Elementor und dem Hello Elementor Theme.
Bei Elementor gibt es auch diverse Module, mit denen man die aktuellen Beiträge von Post Typen ausgeben kann. Mit individueller Auszug Länge.
Allerdings funktioniert dies nie bei Podlove Episoden Typen.
Egal, welchen Wert ich einstelle, der Episoden Post Type ignoriert dies.
Hier ein Beispiel für einen Post mit Typ „Episode“ und einem Post mit Typ „Beitrag“
Kann hier jemand weiterhelfen, warum der Post Type Episode scheinbar keine indivuellen Excerpts unterstützt? Und hat jermand eventuell eine Lösung?
Vielen Dank im Voraus!
getchaos
(Michael)
7. August 2020 um 08:26
2
Habe die Lösung nun selbst gefunden.
Das Problem ist, dass Podlove ein manuelles Excerpt über das Feld „Zusammenfassung“ im Backend erstellt und Elementor manuell erstellte Zusammenfassungen nicht kürzen kann.
Da muss ich nun einen Workaround finden
Daxi
(Christian Daxberger)
7. August 2020 um 10:21
3
Das Verhalten von manuellen Excerpts sollte aber auch bei normalen Beiträgen so sein.
Sobald du explizit Excerpts definierst (in der rechten Seitenleiste), dann sollte dort keine Kürzung mehr stattfinden.
Sollte das Feld leer sein, dann versucht Wordpress eine gewisse Zeichenanzahl (ich glaube 200) sinnvoll aus dem Beitrag als Excerpt zu verwenden.
Elementor wird wohl nur den dafür vorgesehenen Filter für die Länge überschreiben.
Siehe Wordpress Doku:
Du könntest dir höchstens einen Filter auf die get_the_excerpt bauen:
function filter_function_name( $excerpt ) {
# ...
}
add_filter( 'get_the_excerpt', 'filter_function_name' );
Dort könntest du dann wieder kürzen. Für sinnvoll halte ich das allerdings nicht einen explizit definierten Auszug zu kürzen.
getchaos
(Michael)
7. August 2020 um 10:36
4
Mir geht es ja nur darum, dass das Excerpt von Episoden auf einer mit Elementor selbst gebauten Startseite gekürzt wird und nicht im allgemeinen.
Und Elementor gibt als Excerpt immer das aus, was in der jeweiligen Episode unter „Zusammenfassung“ definiert wurde.
Ich habe es jetzt per overflow: hidden mit Hilfe eines css Schmipsels gekürzt.
stehblog
(Gunnar)
16. November 2020 um 15:57
5
Wenn ich das Thema nochmal aufgreifen darf - wo kann man denn Excerpts von Episoden angeben? Ich habe den Textauszug nur bei normalen Beiträgen, aber nicht bei Episoden. Kann/muss man das irgendwo aktivieren?
getchaos
(Michael)
28. Juni 2021 um 07:18
6
Es gibt mittlerweile einen ganz guten Work-Around, den jemand im Elementor Git gepostet hat:
opened 05:18PM - 13 Sep 18 UTC
component/posts
product/pro
request/enhancement
<!-- ## BEFORE POSTING YOUR ISSUE
- Please create GitHub issues only for bug… s and feature requests. GitHub issues ARE NOT FOR SUPPORT!
- If you have questions or need general support, Please use: https://wordpress.org/support/plugin/elementor
- For help and support from the Elementor community, see: https://www.facebook.com/groups/Elementors/
- To read more about Elementor, check out our documentation: https://docs.elementor.com
- Developers docs are located at https://developers.elementor.com/
===== Guidelines ====
- Search this repository (top of the page) for the issue, and make sure it has not been fixed or reported before.
- Make sure you are using the most updated versions of Elementor, WordPress & your theme.
- Deactivate all of your plugins. If this solves the problem, gradually activate your plugins one by one, until you spot the problematic plugin.
- Change your WordPress theme to WordPress TwentySixteen (or other default WordPress theme).
- If you're requesting a new feature, explain why you'd like it to be added. Try to add as much detail as you can, and be specific.
-->
## Prerequisites
- [x ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x ] The issue still exists against the latest stable version of Elementor.
## Description
<!--
Describe which problem you've encountered. What caused the issue, and what did you expect to happen. Attach screenshots and related links to help us understand the issue in more detail.
Please be as descriptive as possible; issues lacking the below details, or for any other reason than to report a bug, may be closed without action.
-->
On my website, there are posts with excerpts and some without excepts.
In the post widget (elementor pro), the post excerpt length works for the posts that do not have excerpts, but for the posts that have excerpts, it doesn't work and shows the full except.
See screenshot:

## Steps to reproduce
<!--
For bug reports, list all the steps needed to reproduce your issue, so we can replicate it ourselves.
-->
1. Create posts that have a long excerpt, and some without excerpt.
2. Add a post widget in a page and try to set the excerpt length.
## Isolating the problem
- [x] This bug happens with only Elementor plugin active (and Elementor Pro).
- [x] This bug happens with a default WordPress theme active.
- [x] I can reproduce this bug consistently using the steps above.
## Environment
<details>
<summary>System Info</summary>
```
```
Operating System: | Linux |
-- | -- | --
Software: | Apache |
MySQL version: | 5.6.41 |
PHP Version: | 7.0.31 |
PHP Max Input Vars: | 1000 |
PHP Max Post Size: | 8M |
GD Installed: | Yes |
ZIP Installed: | Yes |
Write Permissions: | All right |
Elementor Library: | Connected
</details>
Das hier in der functions.php hinzufügen:
function summary($content, $limit = 200) {
$content = strip_tags($content);
// Take the existing content and return a subset of it
$end = '';
if (strlen($content) > $limit) {
$end = '...';
}
return substr($content, 0, $limit) . $end;
}
add_action( 'elementor_pro/posts/query/custom_excerpt', function( $query ) {
function trimTitle( $text, $id = null ) {
return summary($text,80);
}
function trimExcerpt( $text, $id = null ) {
return wpautop(summary($text,110));
}
add_filter( 'the_title', 'trimTitle', 10, 2 );
add_filter( 'the_excerpt', 'trimExcerpt', 10, 2 );
} );
Und anschließend im Widget von Elementor im Tab Layout bei der Query-ID „custom_excerpt“ angeben.
Es werden der Titel auf 80 Zeichen und das Excerpt auf 110 Zeichen getrimmt…kann man natürlich nach belieben in dem Code-Schnipsel anpassen.
Vielleicht hilft das ja dem ein oder anderem.