Support » Requests and Feedback » Custom Excerpt

  • kisanumistry

    (@kisanumistry)


    Can u pls tell me what it wrong with this excerpt code for wordpress. // Excerpt Function

    function excerpt($num) {

    $limit = $num+1;

    $excerpt = explode(‘ ‘, get_the_excerpt(), $limit);

    array_pop($excerpt);

    $excerpt = implode(” “,$excerpt).” ID) .” ‘ class='”.readmore.”‘>Continue Reading »“;

    echo $excerpt;

    }
    when i am using this it’s showing- Warning: Use of undefined constant readmore – assumed ‘readmore’ (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\learningwp\wp-content\themes\mytheme\functions.php on line 71.
    how do can fix the problem.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.