Results 1 to 3 of 3

Thread: What are some good plugin for inserting ads into the posts?

Hybrid View

  1. #1

    What are some good plugin for inserting ads into the posts?

    Can anyone suggest some good wordpress plugins that can dynamically insert HTML (Like adsense code) in the post? When I say dynamically I mean the html is not baked into the post. So it can be updated for all posts on the fly with one change.

  2. #2
    Join Date
    May 2009
    Location
    New York
    Posts
    3,772
    You don't need a plugin to insert Adsense into a Wordpress blog. The best it to use php includes and insert it into the loop. Then put your adsense into a external file i.e. ad1.php

    The loop should start with <?php if (have_posts()) : ?>

    Here's an example of the code:

    Code:
    <?php if (have_posts()) : ?>
    
    <?php  if ($wp_query->current_post < 1) { ?>
    <div style="display:block;float:left;margin: 0px 10px 0px 0px;"> 
    <?php include("ad1.php"); ?>    
    </div>
    <?php } ?>

  3. #3
    Yeah, and you can edit the theme template code directly in your WP Admin area under the Appearance menu.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •