Boost Child Theme Development

Boost Child Theme Development

by Martin Williams -
Number of replies: 3

I'm having difficultly extending the core_renderer of the Boost theme. It seems that my class is not loading, unless I move the file to the root of my theme and name it "renderers.php." Even when I do that, I get "Call to undefined method" errors. Has anyone else ran into these issues?

Average of ratings: -
In reply to Martin Williams

Re: Boost Child Theme Development

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
There are several ways to implement renderers in output classes, one of which is to use the renderers.php file in the root of your theme. Other ways rely on using appropriate folder/file structures and namespaces.
Check how it is done in boost/classes/output/core_renderer.php or in the same file in waxed (as a child of boost).
In reply to Richard Oelmann

Re: Boost Child Theme Development

by Martin Williams -

It looks like the core_renderer.php in waxed is a copy of the one in boost. I'm not sure why all the methods need to be redefined if you are extending the class.

In reply to Martin Williams

Re: Boost Child Theme Development

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
I found I had to keep them in because i was extending the core_renderer, rather than extending the boost methods themselves.
If you extend the boost class, then you would inherit the other boost changes, but as I left it extending the core renderer, not having those other methods/functions there seemed to revert back to the core for the ones that weren't overridden, rather than inheriting the boost one.
Now that may have been an error in what I was doing, but redefining all the methods based on overriding core rather than overriding boost worked for me.