Hi all,
I have tried several methods of adding a search field to my menu, which appears above my header image. I had the best luck with the code posted here: http://forums.themeshaper.com/topic/cant-get-search-to-appear-next-to-menu-please-help-5#post-15730
However, if you visit my blog, http://cookieandkate.com, you'll see that I have somehow created an additional access div. I used his code to remove the original, so I don't know why it happened. I'm not savvy enough with hooks to figure it out myself, so any help would be much appreciated. I hope it is an easy fix.
I copied and pasted all the code from my functions.php that may be relevant to the issue. Thank you for your help!
// Remove the standard Thematic menu
function remove_menu() {
remove_action('thematic_header','thematic_access',9);
}
add_action('init', 'remove_menu');
// Moving the thematic menu above the header
add_action('thematic_aboveheader','thematic_access');
// Add search bar to top menu
// Remove default Thematic actions
function remove_thematic_actions() {
remove_action('thematic_header','thematic_access',9);
}
add_action('init','remove_thematic_actions');
// Create a custom access div with the menu and search box
function search_access() { ?>
<div id="access">
<div class="skip-link">"><?php _e('Skip to content', 'thematic'); ?></div>
<?php wp_page_menu('sort_column=menu_order') ?>
<div id="access-search">
<form id="searchform" method="get" action="<?php bloginfo('home') ?>">
<div>
<input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="20" tabindex="1" />
<input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Search', 'thematic') ?>" tabindex="2" />
</div>
</form>
</div>
</div><!-- #access -->
<?php }
add_action('thematic_aboveheader','search_access',9);
// Filter away the default scripts loaded with Thematic
function childtheme_head_scripts() {
// Abscence makes the heart grow fonder
}
add_filter('thematic_head_scripts','childtheme_head_scripts');
function remove_description($display) {
$display = FALSE;
return $display;
}
add_filter('thematic_show_description', 'remove_description');