Adding Ads

Discussion in 'Blogging' started by itsromanorc, Jun 16, 2016.

  1. itsromanorc

    itsromanorc Power Member

    Joined:
    Apr 20, 2013
    Messages:
    514
    Likes Received:
    59
    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?
     
  2. niravblogs

    niravblogs BANNED BANNED

    Joined:
    Sep 18, 2014
    Messages:
    17
    Likes Received:
    2
    Gender:
    Male
    How to Post in BlackhatWorld.. Can Tell Me
     
  3. Zwielicht

    Zwielicht Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    11,885
    Likes Received:
    17,203
    Gender:
    Male
    Occupation:
    Death
    Location:
    Southern California
    Home Page:
  4. itsromanorc

    itsromanorc Power Member

    Joined:
    Apr 20, 2013
    Messages:
    514
    Likes Received:
    59
    Thanks man, will check it out
     
  5. itsromanorc

    itsromanorc Power Member

    Joined:
    Apr 20, 2013
    Messages:
    514
    Likes Received:
    59
    i notice it only allows for inputing into post, dont really see a way to do so between posts
     
  6. Zwielicht

    Zwielicht Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    11,885
    Likes Received:
    17,203
    Gender:
    Male
    Occupation:
    Death
    Location:
    Southern California
    Home Page:
    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.
    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; ?>
     
  7. itsromanorc

    itsromanorc Power Member

    Joined:
    Apr 20, 2013
    Messages:
    514
    Likes Received:
    59
    Perfect!

    Will try this out, thanks alot mate
     
  8. Linkzo

    Linkzo Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 20, 2015
    Messages:
    1,316
    Likes Received:
    233
    Not a place to ask question like this,anyway you have started increasing your post count in blackhatworld :rolleyes: