May 21, 2014 at 8:31 am #106159
Hi guys, I'm new to the forum and new to WP, Genesis, and Child Themes in general. I've been at it a few months googling, reading blogs, etc. I'm attempting some customizations to the Megalithe Child Theme from Zigzag Press. Here's my question. My theme features a custom home.php page and the home page does not include a sidebar, which I want. Don't child themes inherit from the Genesis Theme? Meaning do I have to register the standard sidebar within home.php or functions.php or should it already be registered by way of Genesis? Shouldn't I just have to activate it via add_action ('hook', ''genesis_do_sidebar' );? This doesn't appear to be working.
Thanks Scott!http://plancooltrips.com/May 21, 2014 at 9:49 am #106164
Check your functions.php or home.php file to make sure that it's deactivated in there (I don't have this theme) - if it is, you can remove that section of the file.
May 21, 2014 at 9:58 am #106167
I did a scan of both functions.php and home.php for "remove_action", as in remove_action('hook', 'sidebar') but didn't find anything that would lead me to believe that the child theme removed the standard Genesis sidebar. I'll keep searching. Thanks for the lead Susan.May 21, 2014 at 10:56 am #106178
Megalithe is a highly customized design, using more custom functions that most Genesis child themes. That and their Prestige theme are fun to play with, despite being a little heavy on how much code you have to scroll through to find areas you want to change.
They didn't actually remove the sidebar (no layouts are unregistered, anyway), they designed the theme to be full width by default. If you look at Genesis > Theme Settings, you should see that the default layout is set to Full Width.
You could change that default layout to be Content-Sidebar, or in your home.php, you could force the layout for that page to be different than full width by using the site layout filter:
//* Force content-sidebar layout add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' );
May 21, 2014 at 1:15 pm #106200
Thanks Summer! I had tried changing the default layout in the Genesis Theme, that didn't work. I also tried your filter idea, first attempt didn't work but I'm going to try a couple more ways to see if I can force content_sidebar? I'm starting to wonder if the sidebar is there but made to look not there in CSS? Big rocks -> little rocks...
Thanks for the suggestions,
-ScottMay 21, 2014 at 4:51 pm #106235
Hmm, pretty big ah ha moment just now, I think??? So in order for a child theme template file to inherit the out of the box goodness from Genesis, Genesis actually has to be called, at least the loop portion?, as in:
I kept hacking at my theme's home.php file and couldn't figure out why I wasn't seeing Genesis elements like:
<div id="content-sidebar-wrap">in the HTML even though I had specified those in the WP/Genesis Admin. Well the home.php file never actually calls genesis. Instead this theme's home page is a completely custom page w/ some nice options. Which is cool if you can live w/ only the options provided. Not so great if you'd planned on customizations via Genesis elements & hooks. 🙁
To come to this realization, I copied the php code from for the home.php file of the Studiopress eleven40-pro theme into the home.php file for Megalithe. I use eleven40-pro on my personal site scottmortiz.com. This created a Frankenstein homepage but it allowed genesis to do its thing and bring in the genesis loop, default layout, etc.
So now the hat trick will be, hacking the Megalithe Theme's home.php functionality into Genesis, get the structural bones right, along with CSS and I'm off to the races. Lesson learned - start simple and build vs. starting with fancy/complex theme and attempting a customization. Ugh, let's do this...May 21, 2014 at 7:07 pm #106241
Yes, forgot about that... the ZigZag guys do a lot of custom loops and custom js in order to create those atypical designs, and sometimes don't make the genesis call.
You can see they make the genesis call in archive and single custom templates, but not home.php or the portfolio templates.
You must be logged in to reply to this topic.