Jump to content
Sign in to follow this  
hoystory

Placing ads between posts

Recommended Posts

catrina

Hello, since PlatformPro doesn't have that _posts.php file, perhaps you should look at the template.postloop.php file instead (it's similar to the _posts.php file in that it controls the post content).


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
hoystory

Thanks Catrina. That's the file I was looking for. On the downside, it appears as though all the instructions I've located for accomplishing this won't work within the PlatformPro code. It appears as though it's doing some counting and incrementing that a standard WordPress installation doesn't do (no surprise there, really), and placing the new code where those linked instructions indicate breaks the whole dang thing. So, any assistance from the devs would be much appreciated.

Share this post


Link to post
Share on other sites
cmunns

Do you want it only between the third and fourth post?

Share this post


Link to post
Share on other sites
hoystory

My original plan was between the 2nd and 3rd, but following the linked directions doesn't work. Any advice would be appreciated.

Share this post


Link to post
Share on other sites
hoystory

I tried smart-ads and also wp-insert (which seems more powerful) and searched through page after page of plugins, but could find nothing which worked right. Both the aforementioned plug-ins will allow you to automatically place ads before, after or in the middle of a single page post (or for each and every post on the main blog page -- which I absolutely don't want). However, I want an ad always sitting between the 2nd and 3rd post on the home page. None of these plugins allow me to accomplish that. I would have to move the "call" for the ad to "after the 2nd" post each time I post (as posts shift down the page) -- a pain in the butt and not worth the effort. It seems as no plug-in has been made because it is much simpler to accomplish this by following the instructions in the link of my first post -- which doesn't work in the PlatformPro coding.

Share this post


Link to post
Share on other sites
hoystory

That's closer. I've located the place in the code to put the ad so it comes after the first post. It's line 146 right after the closed div on:

<?php pagelines_register_hook( 'pagelines_loop_post_end', 'theloop' ); //hook ?>

Unfortunately, this also causes the ad to appear on single-post pages (where I don't particularly want it). I'm pretty sure I need to do some counting somehow, but that sort of coding is over my head.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×