سلام. دوستان من کد زیر را از یک سایت خارجی یافتم. تا بعد از ادامهی مطلب یک بنر را نمایش دهم.
/* Filter content */
add_filter( 'the_content', 'my_content_ads' );
/**
* Add Ads in Content
*/
function my_content_ads( $content ){
/* Not post, return. */
if( !is_singular( 'post' ) ){
return $content;
}
/* Ads Code */
$ads_code = '<a> ads text </a>';
/**
* Add ads after more tag.
* @link http://stackoverflow.com/questions/887447
*/
$content = preg_replace('/<span id\=\"(more\-\d+)"><\/span>/', '<span id="