- This topic has 9 replies, 3 voices, and was last updated 3 years, 8 months ago by Tom.
-
AuthorPosts
-
August 11, 2020 at 6:18 am #1397006David
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
August 11, 2020 at 6:45 am #1397057DavidStaffCustomer SupportHi 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 ?
August 11, 2020 at 7:03 am #1397075DavidYes excatly…the code ist:
<?php the_excerpt(); ?>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(); ?>
” class=”su-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 _e( ‘Posted’, ‘shortcodes-ultimate’ ); ?>: <?php the_time( get_option( ‘date_format’ ) ); ?><?php the_excerpt(); ?><?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; ?>August 11, 2020 at 7:33 am #1397122DavidStaffCustomer SupportTry:
<?php echo get_the_excerpt(); ?>
August 11, 2020 at 7:45 am #1397138DavidThank you, we really appreciate your help.
Unfortunately it does not work:
We see […] in frontend but no excerpts
August 11, 2020 at 9:37 am #1397474TomLead DeveloperLead DeveloperHmm, 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.
August 12, 2020 at 8:02 am #1399045DavidThank 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?
August 12, 2020 at 9:00 am #1399200TomLead DeveloperLead DeveloperThere’s an option to choose the length of the excerpt in Customize > Layout > Blog – does that have a value?
August 12, 2020 at 10:47 am #1399382DavidOh it does. Since it was set 0 there was no chance at all ๐
Thank you!
August 12, 2020 at 1:06 pm #1399609TomLead DeveloperLead DeveloperNo problem! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.