Forums

Read More Link (1 post)

  1. Jallen057
    Member
    Posted 4 months ago #

    I have this code:

    <?php $trim_length = 10;  //desired length of text to display
    		$custom_field = 'proprty_feature';
    		$value = get_post_meta($post->ID, $custom_field, true);
    		if ($value) {
    		  echo rtrim(substr($value,0,$trim_length));
    		}
    		?>

    Which works great, however if it does have to chop the text, I want it to display a 'read more' link, how can I do this?

    Thank you

    [No bumping. If it's that urgent, consider hiring someone.]

Reply

You must log in to post.

About this Topic