Tag Archives: Limit WordPress Post or Page Content

Limit WordPress Post or Page Content

Limit WordPress Post or Page Content

Copy this function and paste in the function.php ———— function dp_clean($excerpt, $substr=0) { $string = strip_tags(str_replace(‘[…]‘, ‘…’, $excerpt)); if ($substr>0) { $string = substr($string, 0, $substr); } return $string; } Call this function in your index.php ———– < ?php echo dp_clean($post->post_content, 250); ? > Muhammad Faridul IslamMuhammad Faridul Islam is an entrepreneur, web developer, and […]