ThemeShaper Forums » Thematic

[closed]

Creating two menus

(5 posts)
  • Started 14 years ago by kbkisan
  • Latest reply from kbkisan
  • This topic is resolved
  1. kbkisan
    Member

    Hi there, I'm hoping someone out there can help me with a problem I am trying to solve.

    Here is the thing... I am using the Thematic theme and I wanted to adjust a few thing so it better suits my needs.
    I'm trying to create two menus, one being the standard top menu and the other being a menu in the footer.

    So let's say I have created 8 pages and I want links to 4 of them to appear in the top main menu, links to 3 of them to appear in the footer menu and 1 not to appear in any menu since it would be a static homepage that I link to using the logo in the header.

    I have been looking around in the forums and I haven't found anything that I could get to work, so any input you could give me would be greatly appreciated.

    Thanks in advance,
    Fannar

    Posted 14 years ago #
  2. Hi Fannar,

    first you need to remove the original top menu:

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

    and then you create a new one:

    function top_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&include=2,173,336') ?>
    	</div><!-- #access -->
    	<?php
    }
    add_action('thematic_header','top_access',9);

    The important part is the parameter include=2,173,336. You need to adjust the page IDs. You need to enter all IDs that should be listed in the top menu.

    The footer menu would be similar .. copy the function with a different name 'footer_access' or so and connect it to thematic_abovefooter().

    Chris

    Posted 14 years ago #
  3. kbkisan
    Member

    Hi Chris and thanks for your quick reply. I have already implemented my top menu thanks to you, but since I am not yet too familiar with php and the code Thematic I can't manage to repeat the step for the footer :|

    This is what I added in my attempt to remove the footer and put my own.

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

    function footer_access() { ?>
    <div id="footer">
    <div id="siteinfo">
    <?php wp_page_menu('sort_column=menu_order&include=31') ?>
    </div>
    </div><!-- #footer -->
    <?php
    }
    add_action('thematic_abovefooter','footer_access',9);

    ?>

    I know I am probably doing something silly.

    Cheers,
    Fannar

    Posted 14 years ago #
  4. kbkisan
    Member

    I think I managed to add the footer but the problem is that it gets styled like the top menu even though I put in the id="footer"

    This is my new code, I removed everything I posted here above and put in this new code without the remove function.

    function footer_access() { ?>
    		<div id="footer">
    			<?php wp_page_menu('sort_column=menu_order&include=31') ?>
    		</div>
    	<?php
    }
    add_action('thematic_abovefooter','footer_access',9);
    Posted 14 years ago #
  5. kbkisan
    Member

    Figured it out, using CSS Edit to see what styles the footer items were receiving. Thanks so much for your help Chris !

    Posted 14 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.