Jump to content
Sign in to follow this  
jpfaraco

Custom code between full and half width magazine posts

Recommended Posts

jpfaraco

I'd like to add a custom code (banner ad) in between the full width posts and the half width posts, in magazine layout. Is it possible ?

Share this post


Link to post
Share on other sites
catrina

It's possible with a hook, which can be implemented with help from this tutorial: http://www.pagelines.com/docs/base-child-theme If you're having trouble getting started, the hook you need to use is pagelines_loop_clipbox_start (this hook is located where you want the banner ad to be).


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
jpfaraco

Thanks Catrina, but this hook refers to the space between one half-width post and the other .. What would be the hook that refers to the space between the last full-width post and the half-width posts wrapper? On my website http://joaofaraco.com.br, that would be here : 20110508-nrmbd23m4mqnrm4323bh4fj46c.jpg

Share this post


Link to post
Share on other sites
kastelic

I would think that the one Catrina mentioned would be the right one, but if thats not working for you try pagelines_loop_post_end. You can look in platformpro/template.postloop.php around line 122 to check the code for hooks (they are all designated with comments.)

Share this post


Link to post
Share on other sites
jpfaraco

Thanks Jimmy, but I think there is no hook for this specific placement. I'm guessing there should be a conditional to check if the number of full-width posts have reached their limit, and if so, register a hook to call in the custom content. But that goes beyond my PHP knowledge ! Please correct me if I'm wrong, or help me with this conditional ...

Share this post


Link to post
Share on other sites
kastelic

Damn, your right about that, sorry. You could copy template.postloop.php into your child theme and just register a new hook or place your code directly after the line that says: // End of Full-Width Post Area

Share this post


Link to post
Share on other sites
jpfaraco

I think that's where the if statement should sit. Because anything that hangs loose there appears at the end of every post loop. Any enlightenment as to how this conditional should be written would be highly appreciated !

Share this post


Link to post
Share on other sites
kastelic

Well you've already got that if statement there that starts the clips so why not put it directly after:

if(pagelines_show_clip($count, $paged) || is_admin()): // Start Clips

Share this post


Link to post
Share on other sites
jpfaraco

Still not the one .. Anything that goes in there appears before every half-width box.

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  

×