WordPress.org

Ready to get started?Download WordPress

Forums

HG Slider
[resolved] Continue Reading wrong URL (5 posts)

  1. Jimladen
    Member
    Posted 11 months ago #

    Hi,

    How can I change where the continue reading button is link to?

    So I basically want the button to link to the URL as defined in the slide rather than the post link.

    Thanks

    http://wordpress.org/plugins/flexslider-hg/

  2. Hal Gatewood
    Member
    Plugin Author

    Posted 11 months ago #

    Hmm, the excerpt text was never meant to be a huge block of text. If you need to increase the amount of characters used you can follow the steps on this page:

    http://wordpress.org/support/topic/changing-excerpt-length?replies=20

  3. Ov3rfly
    Member
    Posted 11 months ago #

    Had the same problem, even a very short excerpt had the "continue reading" link added in slider.

    Turned out it was a problem of the parent theme, in this case Twenty Ten, it adds the link in Twenty Ten functions.php via a filter twentyten_custom_excerpt_more added to get_the_excerpt() around line 280.

    To disable this magic, add something like this to child theme functions.php:

    function my_child_theme_setup() {
    	remove_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_setup' );

    Removing the filter of course also disables adding the link at other places where get_the_excerpt() is used, so we add it again, but not with the 'slides' custom post type:

    function my_adjusted_twentyten_custom_excerpt_more( $output ) {
    	if ( get_post_type() !== 'slides' && has_excerpt() && ! is_attachment() ) {
    		$output .= twentyten_continue_reading_link();
    	}
    	return $output;
    }
    add_filter( 'get_the_excerpt', 'my_adjusted_twentyten_custom_excerpt_more' );

    Note: With a Twenty Eleven based theme there is a similar filter to be dealt with: twentyeleven_custom_excerpt_more

  4. mvanwijnendaele
    Member
    Posted 7 months ago #

    I have the samen problem, but can not resolve it with responsive theme. Thanks for helping me out!

  5. esmi
    Forum Moderator
    Posted 7 months ago #

    @mvanwijnendaele: If you require assistance then, as per the Forum Welcome, please post your own topic.

Reply

You must log in to post.

About this Plugin

About this Topic