Jump to content
Sign in to follow this  
justinroffmarsh

Template in base not overriding corresponding template in Pro

Recommended Posts

justinroffmarsh

I'm using the Sliding Panel plugin, which requires that a line of code is added after the opening body tag in header.php. When I add this code to header.php in Pro it works fine. I have created a duplicate of header.php called template.header.php and placed it in the platformbase folder. When I add this line of code to that file it doesn't work. Accordingly, it appears that the latter file is not overriding the former. Love to know what I've done wrong.

Share this post


Link to post
Share on other sites
kastelic
That method of child templating is not intended to work with header.php. The correct way to do this is to use a hook: http://www.pagelines.com/docs/base-child-theme Here's an example of how to do it: (this goes in platformbase/functions.php) [code] add_action('pagelines_before_page','slider_code'); function slider_code(){ //Your PHP Code goes here } [/code] Use one of these hooks, I can't remember which: pagelines_before_html pagelines_head pagelines_before_site pagelines_before_page before_header pagelines_before_main

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  

×