Jump to content
Sign in to follow this  
photobloghk

Adding Ad banner in Post Loop at the front page

Recommended Posts

photobloghk

Hi, just purchased the theme and it's great!

But I have a problem I couldn't solve : How to Insert Banners in Between WordPress Posts?

 

I found some solution online 

http://smallbusiness.chron.com/insert-banners-between-wordpress-posts-49455.html

 

but I can't find the “if (have_posts())" line in any files contained in pagelines framework file.

 

Here is my testing site.

 

http://www.photoblog.hk/life/

 

And I would like to add a banner after the first five post (between 5th and 6th) and align to the middle.

 

Please advise, thank you :)

Share this post


Link to post
Share on other sites
Rob

Hi,

 

While some have successfully placed ad banners in the postloop, this is not a supported practice.  The reason being that it is a modification of the WordPress loop, not PageLines. 

 

In your blog page, PageLines is simply calling the PostLoop, not modifying it, except for things like fonts, image sizes, etc.  We don't tell it where to stop and start.  For that you're going to have to find a way of safely changing the postloop from WordPress.org.  The key being to prevent the next WordPress update from overwriting your changes.

 

Below are some links that might help:

http://smallbusiness.chron.com/insert-banners-between-wordpress-posts-49455.html

http://wordpress.org/support/topic/content-in-loop

http://wordpress.org/support/topic/adding-ads-and-stuff-between-posts

http://wphacks.com/how-to-insert-ads-only-after-the-first-post/

 

You may need a professional developer to avoid crashing your site and future WP overwrites.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
photobloghk

Hi Rob,

 

When I was using platform pro, there is a file called template.postloop.php

I could simply modify the postloop inside... But in pagelines framework, it simply disappeared...

 

And from all the links you recommend above, they suggest me to find index.php to modify the postloop code

But in pagelines framework, there is nothing inside index.php and I have no idea which file I should modify...

Share this post


Link to post
Share on other sites
Rob

Anything it's telling you to do in the index page, such as custom code, can be injected as code into the PageLines Customize plugin's functions.php.  This is the one safe place to add new functions. The plugin is free in our Store.


Former PageLines Moderator, Food Expert and Raconteur

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  

×