Please add support to make the ellipsis […] clickable at the end of an exceprt

  • Author
    Posts
  • #2352987

    It looks like this should be a simple case for an admin to add the following to functions.php

    function clickable_ellipsis($content){
    
    	$searchfor = '/\[(…)\]/';
    	$replacewith = '[<a href="'.get_permalink().'">$1</a>]';
    
    	$content = preg_replace($searchfor, $replacewith, $content, 1);
    	return $content;
    
    }
    
    add_filter('the_excerpt', 'clickable_ellipsis');

    Source: https://wordpress.org/support/topic/make-in-clickable
    Our blog: http://blog.creditsavvy.com.au/
    Theme: Vision by Pro Theme Design

    The blog I need help with is blog.creditsavvy.com.au.

    #2353090

    Hmm, it’s autoformatted.

    $searchfor = '/\[(…)\]/';

    should read:

    $searchfor = '/\[(& # 8 2 3 0;)\]/';

    without the spaces near 8230

The topic ‘Please add support to make the ellipsis […] clickable at the end of an exceprt’ is closed to new replies.