Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Remove images from the the_content()

<?php 
$content = get_the_content();
$content = preg_replace("/<img[^>]+>/i", "(image) ", $content);          
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
Comment

PREVIOUS NEXT
Code Example
Php :: How to clear previously echoed items in PHP 
Php :: PHP 7 PDF page group - sizeof(): Parameter must be an array or an object that implements Countable 
Php :: get base class name laravel 
Php :: undefined variable require_once 
Php :: wp ajax error handling 
Php :: laravel convert array to string 
Php :: Variable "$id" is not defined by operation "GetPost". 
Php :: image upload in cake 2 
Php :: php Sum of all the factors of a number 
Php :: invalid menu item in wordpress 
Php :: chart trong laravel 
Php :: ubuntu where are laravel logs stored 
Php :: laravel import csv files 
Php :: php artisan spark not working in codeigniter 
Php :: How do I output top readers from MySql table 
Php :: laravel 8 ui auth 
Php :: how to auto increment id after delete value in php mysql 
Php :: laravel validatrion check should be null 
Php :: specific function to Unflatten array 
Php :: submit form and send email in php 
Php :: instagram api error 
Php :: quiz 
Php :: laravel pass multipale provider 
Php :: unlink() in php 
Php :: php get result sql server 
Php :: update php version cpanel 
Php :: how to pass value from one php page to another using session 
Php :: image not displaying in laravel 
Php :: php time passed since date 
Java :: android.support.design.widget.coordinatorlayout androidx 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =