ThemeShaper Forums » Thematic


Add '|' between secondary top menu items?

(5 posts)
  • Started 11 years ago by squidz
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. I have two menus working, primary (in the header) and top (hooked to thematic_aboveheader. Both are set as 3.0 menus.

    I'd like to set the '|' character between links in the top menu such as:

    Contact Us | Directions | Disclaimer

    I found a function that may do this, but I have no idea how to modify it to address only the top menu or the sf-menu classes.

    $links = get_pages();

    foreach($links as $i => $page)
    $links[$i] = '<li class="page-' . (is_page($page->ID) ? 'active' : 'item') . '">ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '';

    echo implode(' | ', $links);

    Posted 11 years ago #
  2. Seems there is an answer to my first question here:

    Anyone on the nav divider question in secondary menu?

    Posted 11 years ago #
  3. i don't know but i have 2 possible ideas.

    1. write a custom walker... i talk a little about that in my menu thread:

    since it is responsible for generating the html for menus this seems like a logical place to add things to the markup.

    2. do something like $menu = wp_nav_menu(); and then a preg_replace for and swap in |

    Posted 11 years ago #
  4. I'll check it out HtV. I just realized I didn't even ask my second question in my original post, for which I though the link I posted might help. Alas, still no solved.

    I'm using author profiles in this site for attorney profiles under a custom 3.0 menu item Our Attorneys. But, the author profiles highlight the Blog nav item by default as the current-page-item. i need to remove that and have it apply to the Our Attorney nav item instead.

    I've been searching and the net in general for a while and not finding a full explanation of how to do this.

    Posted 11 years ago #
  5. yeah i checked out your site from the other post. perhaps you should consider a fully hard-coded menu? i don't have any more ideas. i wonder if that current_page status is generated by the walker?

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.