• Resolved mjinxsd

    (@mjinxsd)


    Hi, love the theme! Is there a way to change the 3 dots (“…”) at the end of each slide’s caption to a “continue reading” link that goes to the rest of the post? Thanks!

Viewing 1 replies (of 1 total)
  • Theme Author Richie KS

    (@rkcorp)

    open lib/functions/theme-functions.php edit line 493

    function dez_get_custom_the_excerpt($limit) {
    if($limit == '' || $limit == '0') {
      } else {
      $excerpt = explode(' ', get_the_excerpt(), $limit);
    if (count($excerpt)>=$limit) {
        array_pop($excerpt);
        $excerpt = implode(" ",$excerpt).'...';
      } else {
        $excerpt = implode(" ",$excerpt).'...';
      }
      $excerpt = preg_replace('<code>\[[^\]]*\]</code>','',$excerpt);
      return $excerpt;
      }
    }

    to

    function dez_get_custom_the_excerpt($limit='',$more='') {
    $excerpt = explode(' ', get_the_excerpt(), $limit);
    $thepostlink = '<a class="post-more" href="'. get_permalink() . '" title="' . the_title_attribute('echo=0') . '">';
      //remove caption tag
      $excerpt = preg_replace('<code>\[[^\]]*\]</code>','',$excerpt);
    
      //remove email tag
      $pattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
      $replacement = "";
      $excerpt = preg_replace($pattern, $replacement, $excerpt);
    
      //remove link url tag
      $pattern = "/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+/i";
      $replacement = "";
      $excerpt = preg_replace($pattern, $replacement, $excerpt);
    
      if (count($excerpt)>=$limit) {
        array_pop($excerpt);
    
        if($more) {
        $excerpt = implode(" ",$excerpt).'...'. $thepostlink.$more.'</a>';
        } else {
        $excerpt = implode(" ",$excerpt).'...';
        }
    
      } else {
        $excerpt = implode(" ",$excerpt);
      }
    
      return $excerpt;
    }

    then edit lib/sliders/jd-gallery-slider.php
    <?php echo dez_get_custom_the_excerpt(30); ?>
    to
    <?php echo dez_get_custom_the_excerpt(30, ‘continue reading’); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Change dots at the end of each slide's caption?’ is closed to new replies.