WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding Google Adsense Under Footer (7 posts)

  1. chenblog
    Member
    Posted 1 year ago #

    Hi, I'm having trouble setting google adsense underneath the menu on my webpage at http://www.chenblog.net. When I place the ads in the footer, it appears above my menu and it doesn't look very pleasant.

  2. jasonmartin55
    Blocked
    Posted 1 year ago #

    have you used html around it to center it?

    And are you sure your using it under the footer border, or over it? as that could be the problem.

  3. chenblog
    Member
    Posted 1 year ago #

    The way I display google ads is by adding the adsense code to a text widget in which I can move into a sidebar or footer. If you click on my website now, you can see what I mean. If there is any other way that I can add an adsense ad, please let me know.

  4. Gabe Young
    Member
    Posted 1 year ago #

    Rather than using a widget, you should be able to place the code directly in the footer where you want it. You can locate and edit the file at Appearance|Editor or use FTP.

  5. chenblog
    Member
    Posted 1 year ago #

    Okay so this is my footer:

    <?php
    /**
     * The footer Template
     *
     * @package WordPress
     * @subpackage minimatica
     * @since Minimatica 1.0
     */
     ?>
     		<footer id="footer">
    			<?php get_sidebar( 'footer' ); ?>
     			<nav id="access" role="navigation">
     				<?php wp_nav_menu( array( 'theme_location'  => 'primary_nav', 'container_id' => 'primary-nav', 'container_class' => 'nav', 'fallback_cb' => 'minimatica_nav_menu' ) ); ?>
    			</nav><!-- #access -->
    		</footer><!-- #footer -->
    	</div><!-- #wrapper -->
    	<?php wp_footer(); ?>
    </body>
    </html>

    ----

    where would I put my adsense code?

    This is the code:

    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-8272375301326654";
    /* Footer Ad */
    google_ad_slot = "4547364820";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
  6. chenblog
    Member
    Posted 1 year ago #

    I've figured it out. I just copied and pasted the code at the very bottom of the footer and that's all it took. Thanks Gabe! :)

  7. Gabe Young
    Member
    Posted 1 year ago #

    You're welcome. Glad it all worked out for you. I agree that it looks much better there.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.