ThemeShaper Forums » Thematic

using thematic_after()?

(3 posts)
  • Started 10 years ago by manlikemalcolm
  • Latest reply from manlikemalcolm
  • This topic is resolved
  1. A bit confused on how to use thematic_after()

    I am using the following code to add a search form to the div#access.

    function add_search_form() {
    get_search_form();
    }
    add_filter('wp_page_menu_args','add_search_form');

    will this

    function add_search_form() {
    get_search_form();
    }
    add_filter('thematic_after(wp_page_menu_args)','add_search_form');

    add the search form to the element after div#access? trying to place the form inside of div#menu.

    Thanks, Malcolm

    Posted 10 years ago #
  2. Hi Malcolm,

    thematic_after() ??? :-) This one is a hook just before closing the body tag.

    Try this one in your child theme's functions.php:

    function remove_access() {
      remove_action('thematic_header','thematic_access',9);
    }
    add_action('init', 'remove_access');
    
    function my_access() { ?>
      <div id="access">
        <div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>
        <?php wp_page_menu('sort_column=menu_order') ?>
        <?php get_search_form(); ?>
      </div><!-- #access -->
      <?php }
    add_action('thematic_header','my_access',9);

    CSS styling is up to you ;-)

    Cheers,

    Chris

    Posted 10 years ago #
  3. Thanks Chris!
    I cam across this article last night which is basically the same process you outlined above!

    http://www.cozmoslabs.com/2009/04/15/add-a-search-box-to-the-thematic-menu/

    Includes the CSS as well! :-)

    Seems like a good candidate for a FAQ or sticky post

    Thanks, Malcolm

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.