ThemeShaper Forums » Thematic

Hiding the #access DIV?

(6 posts)
  • Started 10 years ago by adrians
  • Latest reply from Chris
  • This topic is resolved
  1. adrians
    Member

    Hi,

    I wish to hide the top main menu i.e. the div id="access" Or div class="menu" on all pages in my child Thematic theme, so that all navigation for the site takes place in the sidebar and the footer.

    When I try and set the CSS for either of these to DIVs to display: none; the menu indeed disappears but I receive a JavaScript error in IE7 and IE6 stating "Invalid Argument" on line 2, char 649 - nice and descriptive! ;) Firefox is fine however with no error thrown.

    I believe this is because of the jQuery action that is powering the access menu as it is not related to any other code or plugins on the page.

    Does anyone know how to hide the main menu safely?
    Does it involve work in the child-theme/functions.php file rather than the CSS?

    Cheers,

    Adrian

    Posted 10 years ago #
  2. Hey Adrian,

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

    function remove_menu() {
        remove_action('thematic_header','thematic_access',9);
    }
    add_action('init', 'remove_menu');

    This will remove the menu without a trace.

    Cheers,

    Chris

    Posted 10 years ago #
  3. adrians
    Member

    Hi Chris,

    Thanks very much. That works perfectly.

    Being quite new to WordPress and Thematic development, I'm at a bit of a loss as to understand when to use the /child-thematic-theme/functions.php file?

    Is there a good resource for learning more about when to use the /child-thematic-theme/functions.php with Thematic?

    Cheers,

    Adrian

    Posted 10 years ago #
  4. Definitely .. in general most of the design changes are done using CSS, but CSS can't do everything .. it can't add additional code to your child theme and it can't completely rearrange code in your child theme.

    For doing this you have two options .. you could copy the basic files to your child theme's directory and change them .. bad thing 'cause there might be new stuff in future releases that you want to have in there .. or you could use all types of actions and filters in your child theme's functions.php to adjust your child theme to your needs.

    You can look into my Code Snippets and into the Customization Guide for Thematic. I know that both are still far away from being complete but should be already a good overview where to change what.

    Cheers,

    Chris

    Posted 10 years ago #
  5. adrians
    Member

    Ok, thanks for the link to the Code Snippets and the Customisation Guide. Both are helpful.

    So is the basic idea that 'Theme Hooks' are used if you want to over-write Thematic's own functions whilst 'Theme Filters' are ready-made Thematic functions written by others (kind-of like an API)?

    If I wanted to better understand the Thematic functions would it be best to go through the 10 PHP files in /thematic/library/extensions ?

    I appreciate these questions are a bit basic, so thanks very much for your help thus far.

    Cheers,

    Adrian

    Posted 10 years ago #
  6. Adrian,

    doing this you will learn more than from any documentation :-)

    Cheers,

    Chris

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.