• I have this code and whenever I click read more, it shows the template id but it doesn’t shows up the full content…..

    Here’s the snippet:
    if (isset($testimonial[‘readmore’]) && $testimonial[‘readmore’] != ”)
    $readmore_link = $testimonial[‘readmore’];
    elseif ( $append_link ) {
    if (strpos( $readmore_link, ‘?’) === false)
    $readmore_link .= ‘?testimonial_id=’ . $testimonial[‘id’];
    else
    $readmore_link .= ‘&testimonial_id=’ . $testimonial[‘id’];
    }

    $readmore = ”;
    if ($readmore_link != ”)
    $readmore = ‘‘.$readmore_text.’‘;

    $testimonial[‘testimonial’] = $purifier->purify($testimonial[‘testimonial’]);

    if ($word_limit > 0) {

    $word_limit++;
    $exp = explode(‘ ‘, strip_tags($testimonial[‘testimonial’]), $word_limit);

    /**
    * If there are more words than we actually want (see line 3304) then the last item should be …
    **/
    if (count($exp) == $word_limit)
    $exp[ $word_limit – 1 ] = $readmore;

    $testimonial[‘testimonial’] = implode(‘ ‘, $exp);

    } elseif ($char_limit > 0) {

    if (strlen($testimonial[‘testimonial’]) > $char_limit)
    $testimonial[‘testimonial’] = substr(strip_tags($testimonial[‘testimonial’]), 0, $char_limit).$readmore;

    } else {

    if ( HMS_Testimonials::getInstance()->options[‘nl2br_on_output’] == 1 ) {
    $testimonial[‘testimonial’] = nl2br($testimonial[‘testimonial’]);
    }
    }

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The snippet appears to be for displaying a testimonial excerpt with a read more link appended to the end. When you click that read more link, you should be taken to a single testimonial page where the entire content is displayed. It is the code of what ever the underlying template is that is the likely problem, but the problem could lie elsewhere as well.

    After you click the link, is the content the only thing missing? Do you see meta data like title, date, and author? Or do you get something like “No posts found”?

Viewing 1 replies (of 1 total)
  • The topic ‘read more link not functioning well’ is closed to new replies.