Post Excerpt link script includes unwanted post title

Home Forums Polyclinic Post Excerpt link script includes unwanted post title

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21375

    mosswings
    Participant

    Post Excerpt link script includes unwanted post title

    Resolved

    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

    Consider a donation →

    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.

    #21381

    Oliver Juhas
    Keymaster

    Hi mosswings,

    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 child theme. Copy the polyclinic/template-parts/link-more.php file into your child theme, keeping the subfolder structure, so it becomes child-theme-folter/template-parts/link-more.php and 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&hellip;', 'polyclinic' ); ?>
    	</a>
    </div>

    Best regards,

    Oliver Juhas
    WebMan Design

    #21385

    mosswings
    Participant

    Oliver –

    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 !

    #21388

    Oliver Juhas
    Keymaster

    Hi mosswings,

    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.

    Best regards,

    Oliver Juhas
    WebMan Design

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.