How do i place Adsense blocks at the end of my blog posts.

9 replies
  • SEO
  • |
I am currently using the Max Banner Ads plugin on Wordpres to place my adsense ads onto my blog but have come across a problem. I want to place an adsense block that is at the bottom of any post i make. At the moment i can place a block at the top of my page another one at the bottom of the page but cannot seem to find a way to put one at the bottom of the first post on the page. Can this be done and if so is there a better plugin that i can use.

Regards

Kim
#adsense #blocks #blog #end #place #posts
  • Profile picture of the author GavinLively
    Banned
    Depending on version of WP you are running use a text widget and paste the code right into the text widget then move the widget into the proper area afte content....

    This is how I do it at my WP blog (see my signature)

    Gavin
    {{ DiscussionBoard.errors[618633].message }}
    • Profile picture of the author lianwei
      Go to Single.php and edit it.

      Add the adsense code to the Single Post. Simple !
      {{ DiscussionBoard.errors[620161].message }}
      • Profile picture of the author kimkitch
        Can you please tell me where i might find the single.php file
        {{ DiscussionBoard.errors[629030].message }}
        • Profile picture of the author BillyD
          [DELETED]
          {{ DiscussionBoard.errors[629846].message }}
          • Profile picture of the author kimkitch
            Originally Posted by BillyD View Post

            Hello Kim,

            Log into your worpress blog click on "Design" then click "Theme Editor" it brings up your "Stylesheet" (style.css) over to the right you will see "Theme Files" and then under that it says "templates" then "single post" which is the "Single.php" file. Just click on the "Single Post" and it will bring up the file to edit.

            Hope this helps

            Nicole Davis
            Thanks for pointing that out to me
            I enclose a copy of the single.php file below.

            <?php get_header(); ?>
            <?php $options = get_option('inove_options'); ?>

            <?php if (have_posts()) : the_post(); update_post_caches($posts); ?>

            <div id="postpath">
            <a title="<?php _e('Goto homepage', 'inove'); ?>" href="<?php echo get_settings('home'); ?>/"><?php _e('Home', 'inove'); ?></a>
            &gt; <?php the_category(', '); ?>
            &gt; <?php the_title(); ?>
            </div>

            <div class="post" id="post-<?php the_ID(); ?>">
            <h2><?php the_title(); ?></h2>
            <div class="info">
            <span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
            <div class="act">
            <?php if ($comments || comments_open()) : ?>
            <span class="comments"><a href="#comments"><?php _e('Goto comments', 'inove'); ?></a></span>
            <span class="addcomment"><a href="#respond"><?php _e('Leave a comment', 'inove'); ?></a></span>
            <?php endif; ?>
            <?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?>
            <div class="fixed"></div>
            </div>
            <div class="fixed"></div>
            </div>
            <div class="content">
            <?php the_content(); ?>
            <p class="under">
            <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
            <?php if ($options['categories']) : ?><span class="categories"><?php the_category(', '); ?></span><?php endif; ?>
            <?php if ($options['tags']) : ?><span class="tags"><?php the_tags('', ', ', ''); ?></span><?php endif; ?>
            </p>
            <div class="fixed"></div>
            </div>
            </div>

            <?php else : ?>
            <div class="errorbox">
            <?php _e('Sorry, no posts matched your criteria.', 'inove'); ?>
            </div>
            <?php endif; ?>

            <!-- related posts START -->
            <?php
            // when related posts with title
            if(function_exists('wp23_related_posts')) {
            echo '<div id="related_posts">';
            wp23_related_posts();
            echo '</div>';
            echo '<div class="fixed"></div>';
            }
            /*
            // when related posts without title
            if(function_exists('wp23_related_posts')) {
            echo '<div class="boxcaption">';
            echo '<h3>Related Posts</h3>';
            echo '</div>';
            echo '<div id="related_posts" class="box">';
            wp23_related_posts();
            echo '</div>';
            echo '<div class="fixed"></div>';
            }
            */
            ?>
            <!-- related posts END -->

            <?php include('templates/comments.php'); ?>

            <div id="postnavi">
            <span class="prev"><?php next_post_link('%link') ?></span>
            <span class="next"><?php previous_post_link('%link') ?></span>
            <div class="fixed"></div>
            </div>

            <?php get_footer(); ?>

            Can you let me know where exactly i place my adsense code

            Thanks

            Kim
            {{ DiscussionBoard.errors[629935].message }}
            • Profile picture of the author BillyD
              [DELETED]
              {{ DiscussionBoard.errors[642208].message }}
              • Profile picture of the author kimkitch
                Originally Posted by BillyD View Post

                Kim,

                You can follow these steps below to insert your adsense code Within the theme editor window, scroll down to where it says <div class="entrytext"> on my wp blog it shows up as <div class="entry">

                Directly below <div class="entrytext"> add your AdSense code

                Click the Update file button and go view your site!
                You can surround the code with <div></div> tags. This will allow us to position the advertisment where we want it.

                This example below is for left side placement, If you want the ad to float right, change float:left to float:right. If you don't want to position the code left or right just surround your code with the <div></div> tags

                <div style="float:left; padding-top:20px; padding-right:10px;"><script type="text/javascript"><!-
                google_ad_client = "pub-1234567890";
                google_ad_slot = "1234567890";
                google_ad_width = 336;
                google_ad_height = 280;
                //->
                </script>
                <script type="text/javascript"
                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script></div>

                Hope this helps, let me know

                Thanks,
                Nicole
                Nicole

                Sorry if i am sounding a bit thick but i am still confused. You say to scroll down to where it says <div class="entrytext"> and add the adsense code underneath. In my single.php file i cannot see the text that you say to look for, so am i looking in the wrong file.

                Regards

                Kim
                {{ DiscussionBoard.errors[645120].message }}
  • Profile picture of the author BeauPenaranda
    Originally Posted by kimkitch View Post

    I am currently using the Max Banner Ads plugin on Wordpres to place my adsense ads onto my blog but have come across a problem. I want to place an adsense block that is at the bottom of any post i make. At the moment i can place a block at the top of my page another one at the bottom of the page but cannot seem to find a way to put one at the bottom of the first post on the page. Can this be done and if so is there a better plugin that i can use.

    Regards

    Kim
    Kim,

    You can just look for another plugin. As you get more familiar with Wordpress, placing code in files will become second nature. If you don't quite understand it yet, I would suggest getting another adsense plugin at wordpress.org.

    An easy plugin that can do this is called "easy adsenser".
    {{ DiscussionBoard.errors[645251].message }}
    • Profile picture of the author kimkitch
      Originally Posted by BeauPenaranda View Post

      Kim,

      You can just look for another plugin. As you get more familiar with Wordpress, placing code in files will become second nature. If you don't quite understand it yet, I would suggest getting another adsense plugin at wordpress.org.

      An easy plugin that can do this is called "easy adsenser".
      I am now using an adsense plugin which i am finding a lot easier to work with, thanks for the advice.
      {{ DiscussionBoard.errors[648838].message }}
  • Profile picture of the author ShabirAli
    I think you can open , index.php of theme file in notepad and place code below blog post functions. This will be the best trick.
    {{ DiscussionBoard.errors[647693].message }}
  • Profile picture of the author joeljonathan
    Yea, no need to try and come up with a solution on your own or custom code anything. There are a ton of different WP Adsense plugins that you can use and play around with.
    Signature

    Try out our tools for finding great domain names at http://www.domainsuperstar.com

    {{ DiscussionBoard.errors[651172].message }}

Trending Topics