June 17, 2013 at 7:32 pm #5337
Hi Eric & everyone!
I’m working on a new template for my Epik site. I think the template is pretty simple, and I’m having a couple challenges getting everything just the way I want it. Here’s a layout of what I’m trying to create:
[normal epik header info here]
[normal main nav]
[custom secondary nav, could be handled by a plugin]
[widget area for a slider] [start of righthand sidebar]
widget area for ‘featured posts’ category [rh sidebar continues]
widget area for ‘childpost cat1’][widget area for 'childpost cat2] [rh sidebar continues]
Seems simple enough. But if you look at my test page at:
you’ll see a couple problems I’m having trouble solving. How do I:
* move the breadcrumbs above the slider widget?
* get the sidebar adjacent to the slider widget?
Further, I’m clear that I have to define my css for the slider widget (haven’t done that yet); so I’m wondering if the sidebar widget is going to ‘float’ up when I shrink the slider widget to my desired width?
I don’t need n00b training (dont worry, i’ve spent all day looking through genesis tutorials++), so if you can just point me in the right direction, that’s all I need, like this:
1. Do x to get your widgets below breadcrumbs*
2. Answer ‘yes when you shrink the slider dimensions the sidebar will float up’
And then I can take it from there!
I’m super grateful for all the help you’re willing to share!
Thanks — owe you a beer, bigtime!
* As in, “you’re going to need to instance the various parts of header. Look at [name-of-template] to get an idea of what you’ll have to do.” <– hope this footnote isn’t confusing!June 17, 2013 at 11:17 pm #5347EricCustomer
Here is how to reposition the breadcrumbs – http://my.studiopress.com/snippets/breadcrumbs/#reposition
The slider is set to show after the header…..so you could reposition it the same way, and if you need to just add a priority to it to control the order.
The slider and the sidebar are in to completely separate places. The slider is in its own div, and the sidebar is inside the content div/area. You would have to make the slider show up inside of the content area (maybe right above the #content div) and change its width so it will float left of the sidebar.
This can all be done from the home.php file….you’ll see something like this –
add_action( 'genesis_after_header', 'optimal_home_loop_helper_top' );….and thats where you’d need to start as far as adding your code or repositioning it.
I create awesome sites for awesome people! Contact me if interested – firstname.lastname@example.orgJune 18, 2013 at 6:17 pm #5368
Hi Eric! Ok I think I understand, so lets make sure …
Your comment says “This can all be done from the home.php file …”
However, since I want to create a separate template, and not mess with home.php, I should copy “add_action( … );” from home to blog_page.php and work from there.
Is that right, or is the ‘home’ page for Epik inside of a larger ‘conditional’ statement, and the part you’re referencing is not for the ‘homepage’ itself, but for a page outside of that condition?
Thanks for your help clarifying these little details!
-DonOJune 19, 2013 at 9:15 pm #5389EricCustomer
Yes, you mentioned “Slider” and the code for the slider is in the home.php file….which is what is being used to show your homepage by default. That’s why I referenced the code featured in the home.php file to make your customizations to.
I create awesome sites for awesome people! Contact me if interested – email@example.comSeptember 19, 2013 at 8:44 pm #7513jennifergrayebCustomer
How were you able to get your secondary nav below your header?September 20, 2013 at 12:19 pm #7519
Hi jennifer – ok, here’s the code I used. I put this in functions.php b/c I wanted these changes to be site wide:
//* Reposition the primary navigation menu
remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
add_action (‘genesis_before_header’, ‘genesis_do_nav’ );
//* Reposition the secondary navigation menu
remove_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
I think in my case the subnav actually appeared ‘above’ the main nav, so I had to do some re-thinking to make the terms ‘nav’ and ‘subnav’ make sense with what I did in the menus section of WordPress. (I think it might be backwards in Epik, not sure.)
In the add_action section, you can replace ‘genesis_(before/after)_header’ with whatever hook you like, and you can look inside Genesis documentation for details on all the different ‘hook locales’ that appear on your theme. There’s even a plugin called ‘Genesis Visual Hook Guide’ to help out. Careful with the hook guide, tho’, b/c it doesn’t give you a fully-resolved class or id. You’ll have to dig deeper with firebug to get all the goodness. Don’t rely on the Hook Guide alone when you edit your CSS.
As you already know (this is more for those who are new-ish), it doesn’t matter where you put these instructions; you can stick them anywhere within functions.php, as long as you don’t stick them in the middle of some other code (of course).
What I do is just start a ‘Don’s customizations’ section at the bottom of the functions.php file, where I literally type:
//* CUSTOMIZATIONS START HERE
And then I add whatever elements I want; that way it’s easier to see what changes I made, they are all in the same place, blah blah.
Lemme know if that works for you!
- You must be logged in to reply to this topic.