Twenty Ten : Which code to edit to include google adsense code after each post
-
Hi,
I would like to add a google adsense banner below each post just after the posted in/comment line. I have tried to add it in the child index.php file but it doesnt seem to appear in the right place.Below is how my child index file look like. Where should I be inserting my code? Or should i be inserting it in a different file?
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: https://codex.www.ads-software.com/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/get_header(); ?>
<div id=”container”>
<div id=”content” role=”main”><?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part( ‘loop’, ‘index’ );?>
</div><!– #content –></div><!– #container –>
<?php get_footer(); ?>
The only difference between this file and the parent file is that i removed the ‘php get_sidebar’ line from the child index file.
Thanks in advance.
- The topic ‘Twenty Ten : Which code to edit to include google adsense code after each post’ is closed to new replies.