Archived topic
Excerpt not shown (GP Premium + Elementor + Shortcode Ultimate)
9 replies · Started by David on August 11, 2020
Hello everybody!
We are using GP Premium with Elementor and Shortcode Ultimate. I know its not the best combination but the website was built so. As you cann see on our old website, related articles shown with shortcode ultimate have a title, img, date and excerpt. After switching to the new website, the excerpt is gone. I know that someshow a function in the old themwas used (mh_excerpts). I really hope somebody can help with that as we tried everything.
Thank you so much!
David
Hi there,
just looking at the Shortcode Ultimate docs on Post loop:
https://getshortcodes.com/docs/posts/
It doesn't look like it supports the excerpt - so was a custom loop shortcode created ?
Yes excatly...the code ist:
Is there anything I need to add to the themes functions php?
Thank you!
full code:
<?php if ( $posts->have_posts() ) : ?>
<?php while ( $posts->have_posts() ) : $posts->the_post(); ?>
<?php if ( has_post_thumbnail( get_the_ID() ) ) : ?>
"><?php the_post_thumbnail(); ?>
<?php endif; ?>
<h2 class="su-post-title">"><?php the_title(); ?></h2>
<?php if ( have_comments() || comments_open() ) : ?>
" class="su-post-comments-link"><?php comments_number( __( '0 comments', 'shortcodes-ultimate' ), __( '1 comment', 'shortcodes-ultimate' ), '% comments' ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<h4><?php _e( 'Posts not found', 'shortcodes-ultimate' ); ?></h4>
<?php endif; ?>
Try:
<?php echo get_the_excerpt(); ?>
Thank you, we really appreciate your help.
Unfortunately it does not work:

We see [...] in frontend but no excerpts
Hmm, that should work if content exists.
You could try: <?php the_excerpt(); ?>
If that doesn't work, it means something is filtering the excerpt, causing it not to display. Could be a plugin or a custom function.
Thank you...still not working.
With our last website we used MH Themes and there was a function in the customizer to determine the length of the excerpt and more. Is there an option with GP too?
There's an option to choose the length of the excerpt in Customize > Layout > Blog - does that have a value?
Oh it does. Since it was set 0 there was no chance at all :-)
Thank you!
No problem! :)