WordPress.org

Forums

Simple Permalinks = "Broken" wp_nav_menu CSS? (1 post)

  1. hunterjones
    Member
    Posted 11 months ago #

    Hi All -

    So, I'm stumped, and I'm not sure if there's just some small feature that I'm missing someplace, or if there's a plugin that can help solve this problem, but here's the situation:

    I'm working on a pretty sizable and complex site right now, that has upwards of 70 pages, and that goes as deep as 4 levels in some places. Because the site is deep and complex I'm using wp_nav_menu in a variety of places to generate navigation menus, which is a great tool because it inserts stylable classes in menus based on the parent-child relationship that you establish in the back-end (which we all know).

    But, there's a problem though, and that problem is SEO. I'm trying to get my permalinks to NOT look like this:

    http://www.imgoingcrazy.com/top-page-here/level-two-page/level-three-page/here-you-are-page
    And instead look like this:

    http://www.imgoingcrazy.com/here-you-are-page

    That is, I'm trying to "flatten" the permalink structure *without* removing the parent/sibling relationship between the pages. Why? Because If I remove that relationship to make the site as SEO optimized as possible, the wp_nav_menu won't insert the appropriate classes (like 'current-page-ancestor' or 'current-page-item') to style navigation. Navigation styling becomes busted.

    Suggestions? I've looked over the codex, and unless I've missed something someplace I haven't yet found a solution.

    Thanks in advance!

    -- HJ

Reply

You must log in to post.

About this Topic