I'm trying to move the #access div above the header, (at the top of the page), and include a search box to the right of the menu at http://rehabandmobilitysystems.com/wordpress/. I've followed the instructions at http://forums.themeshaper.com/topic/how-to-move-page-menu-from-access-to-new-div-above-header, but I end up with two #access div's. One that's in the header and one above the header. I've also read through http://forums.themeshaper.com/topic/widgets-in-the-header and http://www.cozmoslabs.com/2009/04/15/add-a-search-box-to-the-thematic-menu/ in hopes of figuring out a way to include a search widget in the menu, but to no avail, (at least not how I'd like it to turn out). Is there a way for me to move the search widget to the right of the menu, then in turn move that menu, (#access), to the top of the page by modifying the functions.php file? Any help on this matter is greatly appreciated.
ThemeShaper Forums » Thematic
Move #access above header with search widget.
(7 posts)-
Posted 12 years ago #
-
regarding the 2 divs, you clearly forgot to REMOVE the original access. what trouble are you having specifically b/c the cozmoslabs link seems to detail exactly what you are looking for... including this bit about removing the old access:
function remove_access() { remove_action('thematic_header','thematic_access',9); } add_action('init','remove_access');
the cozmoslabs tut doesn't create a widget... it creates a search bar and then styles it to the right of the access menu. why do you need a widget area when you can add a hard-coded search bar?
Posted 12 years ago # -
Thank you so much for the response, helgatheviking. I'm just curious, is there a way to move just the search box to the top of the page, (above #blog-title, at the top of #branding)? I was able to place both #access and the new search box at the top of the page after playing with it for awhile, but I'm not a big fan of the results. Thanks again, I really appreciate your help. And trust me, I'm trying my best to wrap my head around this whole child theme development. I'm so used to directly modifying WP themes, though. :)
Posted 12 years ago # -
you can hang the search function wherever there is a hook.
required reading- Hooks Diagram:
http://bluemandala.com/thematic/thematic-structure.htmlnotice in the diagram that there are already functions on thematic_header positions 1,3,5,7, and 9. you can remove them as you see fit.
function search_bar(){ //search code i am too lazy to look up } add_action('thematic_header','search_bar', 2);
this will make it the first thing inside the branding div. to get it outside the branding div you'd need to first remove the branding_open from spot 1 and then add it to spot 2. then you can put the search_bar function on spot 1
function remove_stuff(){ remove_action('thematic_header', 'thematic_brandingopen',1); } add_action('init','remove_stuff'); add_action('thematic_header','thematic_brandingopen',2);
`
Posted 12 years ago # -
Thanks again for the response. I was able to achieve the results I was looking for by adding the following to my functions.php file...
function remove_branding(){
remove_action('thematic_header', 'thematic_brandingopen',1);
}
add_action('init','remove_branding');add_action('thematic_header','thematic_brandingopen',2);
add_action('thematic_header','thematic_search_form', 2);
I'm not sure if this is the best way to do it but it works.
Posted 12 years ago # -
well if you are just going to put thematic_search_form on spot 2 then you probably don't need to bother removing the brandingopen, but glad it is working
Posted 12 years ago # -
Cool. I removed this from the functions.php file...
`function remove_branding(){
remove_action('thematic_header', 'thematic_brandingopen',1);
}
add_action('init','remove_branding');add_action('thematic_header', 'thematic_brandingopen',2);`
What I am left with is this...
add_action('thematic_header', 'thematic_search_form', 2);
The end result is exactly the same. I thought something didn't look right with the original code. Thanks for all your help, helgatheviking.
Posted 12 years ago #
Topic Closed
This topic has been closed to new replies.