Adding Ads

itsromanorc

Power Member
Joined
Apr 20, 2013
Messages
707
Reaction score
95
I want to place some ads in between posts for example.

Post 1

(Ad)

Post 2

And so on, is there any plugin or way to do this?
 
i notice it only allows for inputing into post, dont really see a way to do so between posts
 
i notice it only allows for inputing into post, dont really see a way to do so between posts
That's the primary feature (and the one I use it for), although in version 1.1.x.x+, you should have the option for template ads.
New Features 1.1.x.x

Template ads - you can now include ads anywhere in your theme template with some simple tags. You can load the top/random/bottom/footer ads, or you can load an ad from a text file on disk. Template ads inherit the same dynamic and global restrictions as for ads configured via the UI.

If anything, you can also look into using this plugin: https://wordpress.org/plugins/adrotate/

If those plugins don't work for you at all, you should be able to just add the ad code to your index.php file like in this example I found:
Code:
<?php if ( have_posts() ) : ?>

<?php $count = 1; ?>

    <?php while ( have_posts() ) : the_post(); ?>

        <?php get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?>

        <?php if ( is_singular() ) comments_template(); // Loads the comments.php template. ?>

        <?php if($count == 1):?>

            <div class="ad-homepage">
          // Ad code goes here
            </div>

        <?php endif;?>

    <?php $count++;?>

    <?php endwhile; ?>

<?php else : ?>

    <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>

<?php endif; ?>
 
Perfect!

Will try this out, thanks alot mate
 
Not a place to ask question like this,anyway you have started increasing your post count in blackhatworld :rolleyes:
How to Post in BlackhatWorld.. Can Tell Me
 
Back
Top