- This topic has 9 replies, 3 voices, and was last updated 5 months, 1 week ago by Tom.
August 11, 2020 at 6:18 am #1397006David
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!
DavidAugust 11, 2020 at 6:45 am #1397057DavidStaffCustomer Support
just looking at the Shortcode Ultimate docs on Post loop:
It doesn’t look like it supports the excerpt – so was a custom loop shortcode created ?August 11, 2020 at 7:03 am #1397075David
Yes excatly…the code ist:<?php the_excerpt(); ?>
Is there anything I need to add to the themes functions php?
<?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 SupportAugust 11, 2020 at 7:45 am #1397138David
Thank you, we really appreciate your help.
Unfortunately it does not work:
We see […] in frontend but no excerptsAugust 11, 2020 at 9:37 am #1397474TomLead DeveloperLead Developer
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.August 12, 2020 at 8:02 am #1399045David
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?August 12, 2020 at 9:00 am #1399200TomLead DeveloperLead DeveloperAugust 12, 2020 at 10:47 am #1399382David
Oh it does. Since it was set 0 there was no chance at all 🙂
Thank you!August 12, 2020 at 1:06 pm #1399609
- You must be logged in to reply to this topic.