Archived

This topic is now archived and is closed to further replies.

Adding Adverts between blog posts

6 posts in this topic

Posted · Report post

I'd like to be able to have an advert placed between the 3rd and 4th post on my blog. How would you go about doing this? As an example, uncrate.com home page (blog). Notice the adverts placed between blog posts as you scroll down.

Share this post


Link to post
Share on other sites

Posted · Report post

this is tough.. have you looked for a plugin?

Share this post


Link to post
Share on other sites

Posted · Report post

Hey Michael this looks great. We're going to want to do this in the 'library/_posts.php' file. You should be able to follow those directions exactly. Let me know if you get stuck or if you need help with it.

Share this post


Link to post
Share on other sites

Posted · Report post

Done! Screen Shot in action For reference, I inserted the <?php $count = 1; ?> before this line: <?php if (have_posts()) : while (have_posts()) : the_post(); ?> And then the advert code (currently, still testing out best position) before this line (and after the </div> that closes the post): <?php if(is_single()):?>

Share this post


Link to post
Share on other sites

Posted · Report post

That looks great! I'm glad you got it working.

Share this post


Link to post
Share on other sites