ThemeShaper Forums » Thematic

[closed]

How to add secondary menu to access div?

(8 posts)
  • Started 4 years ago by rkread
  • Latest reply from rkread
  • This topic is resolved
  1. rkread
    Member

    Hi,

    I'm new to Thematic but have made some good progress thanks to all the resources here.

    I've customized the access div page menu to appear in the header area. I'd like to add a second menu, consisting of just one page link, below it, and would really appreciate some help with this.

    I tried inputting Ian's code for the Primary/Secondary menus but the result was a blank page. I'm pretty clueless about PHP but I can copy and paste and style with CSS.
    Here's a link:
    http://www.rkread.com/wp/

    The primary menu I'm referring to is the Contact/Press/Advertise, and the secondary would be the "who is ADD...?" item.

    thanks very much.

    Robin

    Posted 4 years ago #
  2. grapesoda
    Member

    Hi Robin,

    Sorry this isn't about your enquiry but I notice you managed to get your 'page menu' to appear in the header. This is exactly what i would like to do and it's driving me crazy! Could you help me out with this or point me to a link that helped you?

    Thanks!

    Posted 4 years ago #
  3. @grapesoda: Maybe take a look at this tutorial by Ian on the main Themeshaper website: http://themeshaper.com/wordpress-menu-tricks/

    Posted 4 years ago #
  4. grapesoda
    Member

    @flick: Thanks very much for replying, I only need the page menu moved while keeping the category menu where it is though. This sort of thing (top menu): http://www.cozmoslabs.com/projects/commune/

    You can reply to the original thread I opened here thanks!

    Posted 4 years ago #
  5. @grapesoda: Glad you got it resolved in the other thread :)

    Posted 4 years ago #
  6. I can't look at my thematic files right now.. but why not try removing the current thematic access action

    function remove_default_access() {
    remove_action ('thematic_header','thematic_access',9);
    }
    add_action ('init','remove_default access');

    and then rebuilding it w/ an extra div

    function child_access(){
    x
    ?>
    <div id="access">
    COPY IN ORIGINAL ACCESS FROM THEMATIC LIBRARY
    </div>
    <div id="extra link">
    <a href="link.html">Who is ADD?</a>
    </div>
    <php?
    }
    
    add_action('thematic_header','child_access',9);

    or you could remove #access from hook 9 , move it to hook 8. then create a new function and add that to hook 9. the remove is the same as before.

    add_action('thematic_header','thematic_access',8);
    
    function extra_link() { ?>
    <div id="extra link">
    <a href="link.html">Who is ADD?</a>
    </div>
    <php?
    }
    add_action('thematic_header','extra_link',9);
    Posted 3 years ago #
  7. rkread
    Member

    Thanks for your response @helgatheviking--Sadly, it's been some time and I didn't realize my question had been answered here...but this is what I ended up doing:

    //Add secondary menu (Who is ADD?) to header
    
          // Remove the default Thematic Access
    
          function remove_thematic_actions() {
    
              remove_action('thematic_header','thematic_access',9);
    
          }
    
          add_action('init','remove_thematic_actions');
    
          // Recreate the Thematic Access with menu-primary and menu-secondary
    
          function childtheme_page_menu() { ?>
    
           <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('exclude=128&menu_class=menu menu-primary'); ?>
    
                  <div class="menu menu-secondary">
    
                      <ul>
    
                          <?php wp_list_pages('title_li=&include=128'); ?>
    
                      </ul>
    
                  </div>
    
              </div><!– #access –>    
    
          <?php }
    
          add_action('thematic_aboveheader','childtheme_page_menu','9');

    It all worked out well, or so I thought until I saw that the placement of the element appears correctly in Firefox but not Safari...that issue I'm still trying to resolve.

    Posted 3 years ago #
  8. rkread
    Member

    It all worked out well, or so I thought until I saw that the placement of the element appears correctly in Firefox but not Safari...that issue I'm still trying to resolve.

    Just an FYI followup--menu placement problems fixed in CSS with absolute positioning instead of floats.

    Live site is here: http://www.diywithadd.com/

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.