I want to add a code in each post after the first paragraph. After searching on the internet, I found instructions on how to do that. The isntructions, however, change it in the single.php file.
I think I need to change this in the ATO section (right??):
So I went to ATO / Centre columnd / Style & Edit centre column.
And here is where I get stuck.
The instructions state to replace
Code:
<?php the_content(); ?>
Here is the code I should replace the above with:
Code:
<?php $show_after_p = 1; $content = apply_filters('the_content', $post->post_content); if(substr_count($content, '<p>') > $show_after_p) { $contents = explode("</p>", $content); $p_count = 0; foreach($contents as $content) { echo $content; if($p_count == $show_after_p) { ?> INSERT ADSENSE CODE or Any other ads code <? } echo "</p>"; $p_count++; } } ?>
Ann.