I’d like to insert Adsense code after the first paragraph in individual posts but before the rest of the story. I saw this topic which describes adding it after the excerpt:
However, I’m encountering two problems with that solution:
1. I’m using Magazine-Basic for my theme and the theme’s single.php file contains only the following:
<?php get_header(); ?> <?php get_template_part( 'loop', 'single' ); ?> <?php get_footer(); ?>
I therefore can’t use the code from the topic referenced above.
2. The excerpt cuts off arbitrarily after a certain number of characters, not at the end of the introductory paragraph so I’m not imagining that placing the ad after an excerpt, mid-sentence, would look terribly attractive.
As a solution to the paragraphing issue I found this:
However, that requires the same code in the single.php referenced in problem #1, above, that Magazine-Basic’s single.php file doesn’t have.
Can someone who knows better than me (and that’s just about anyone!) point me in the right direction? Thanks in advance!
- The topic ‘Trying to add Adsense code in posts after first paragraph’ is closed to new replies.