7 Jun 2019 at 23:50 #21375
Post Excerpt link script includes unwanted post titleResolved
Hey there! Have you noticed this support service is provided FREE of charge?
If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you ♥
My Polyclinic-based website is getting some much-needed maintenance after several major changes to the plugins and WP foundations. I’ve noticed a curious change in post excerpts rendered through my Smart Slider 3 plugin: they now include the title of the post, instead of the simple phrase “continue reading”. Smart Slider support says that they’re simply picking up the value of the excerpt variable and printing it.
Did Polyclinic make this change to the excerpt variable content in the last 2 years? If so, is there a way to revert to the original phrase, without the quoting of the post title?
The behavior can be observed in the slider at the top of the home page of http://www.pflagpdx.org, 2nd slide, “still needed after all these years”.
Thanks.9 Jun 2019 at 19:47 #21381
My themes actually always displayed the post title in “Continue reading” link. But as there was a change in this behavior in one of the recent theme updates, this might interfere with Smart Slider 3 plugin (but only if it strips HTML tags from excerpts).
Looking at the code of your homepage slider I don’t quite understand how Smart Slider 3 processes the post excerpt. It seems to strip only some of HTML tags, unfortunately, including the ones that hides the post title in “Continue reading” link accessibly.
To resolve this issue you can check whether there is a setting option in Smart Slider 3 not to strip HTML tags from post excerpts.
Alternatively you can override the theme functionality via a. Copy the
polyclinic/template-parts/link-more.phpfile into your , keeping the subfolder structure, so it becomes
child-theme-folter/template-parts/link-more.phpand use this code in the file:
<div class="link-more"> <a href="<?php the_permalink(); ?>" class="more-link" aria-label="<?php echo esc_attr( sprintf( /* translators: %s: Name of current post */ __( 'Continue reading %s', 'polyclinic' ), the_title_attribute( array( 'echo' => false ) ) ) ); ?>"> <?php esc_html_e( 'Continue reading…', 'polyclinic' ); ?> </a> </div>
WebMan Design10 Jun 2019 at 00:35 #21385
You guessed correctly…Smart Slider has a couple of filter strengths, and I’m using the strength that doesn’t clean all HTML tags…and it did change its slide generator variable handling a while ago, so I filtered at the minimum strength to solve some other problems. I believe I’m using a child theme, so I may add the code you suggest into it. Thanks !10 Jun 2019 at 11:41 #21388
Thank you for update about how Smart Slider 3 works.
Basically, if it is possible to set the Smart Slider 3 filter not to remove the
<span>HTML tag (and it’s
class="screen-reader-text"parameter) you should be perfectly fine regarding this issue.
You must be logged in to reply to this topic.