Which file is responsible for top part of each post? I want to add adsense code to every new post that appear on my blog. Which file should I edit?
Which file is responsible for top part of each post? I want to add adsense code to every new post that appear on my blog. Which file should I edit?
Guys just want to add adsense code to the tope of all my existing and new posts. Can't do it manually as I've got 100s of posts. There must to be a FTP file where the code should be inputed for the ads to appear in every post. Please help
well if you insert it in theme's index.php then it would show on all front page posts
if you insert it in theme's single.php it will show on single post pages, etc.
however, it's not smart to modify core files as they get overwritten in an update
either create a child theme
http://codex.wordpress.org/Child_Themes
or use a plugin
http://wordpress.org/extend/plugins/all-in-one-adsense-and-ypn/
bumping also is not allowed - especially after only a few minutes
next time it will be deleted on sight
the posts are shown by the wordpress function the_content() which is called within the various template files such as index.php, single.php, archive.php etc.
http://codex.wordpress.org/Theme_Development
http://codex.wordpress.org/Template_Hierarchy
in your case, in a rush without programming, i would suggest that you use one of the many adsense plugins that would allow you to add adsense to the posts.
http://wordpress.org/extend/plugins/search.php?q=adsense&sort=
Thanks alot for your help guys. Thought it'd be easier this way, but finally decided to use a plugin.
Sorry for bumping Samuel B, didn't know its not allowed ;)
This topic has been closed to new replies.