TahsinCetinkaya adlı üyeden alıntı: mesajı görüntüle
hocam oraya manuel eklemen gerekir yada oraya boşluk bırakıp otomatik de yapabilirsin...pm atın incelemek isterim..
Buraya konu açınca buldum hocam sonunda


Belki başka arayanlar olur diye kodları ekliyorum


function insert_ad_block( $text ) {

    if ( is_single() ) :

        $ads_text = '<div class="wpselect_middle_content">-----reklam-----</div>';
        $split_by = "\n";
        $insert_after = 5; //number of paragraphs

        // make array of paragraphs
        $paragraphs = explode( $split_by, $text);

        // if array elements are less than $insert_after set the insert point at the end
        $len = count( $paragraphs );
        if (  $len < $insert_after ) $insert_after = $len;

        // insert $ads_text into the array at the specified point
        array_splice( $paragraphs, $insert_after, 0, $ads_text );

        // loop through array and build string for output
        foreach( $paragraphs as $paragraph ) {
            $new_text .= $paragraph; 
        }

        return $new_text;

    endif;

    return $text;

}
add_filter('the_content', 'insert_ad_block');