• Resolved Mattaton

    (@mattaton)


    I am fairly new to WordPress theming and I’m teaching myself how to do it.

    I’ve done a couple custom themes for websites and I have another that will be a lot like one of the others apart from some colors and images. I copied the theme and changed the name and then activated it on the same WP install. The menu styles broke. I started looking at the code and realized for one theme, WP used menu-item classes for the menu…well, items. But, when the other theme is activated (which is virtually identical to the first), it uses page-item classes for the menu items. Why would it switch???
    The menu is included in the theme with wp_nav_menu().

    It also did weird things like unchecking the menu locations for custom menus even though the names of the locations are identical. It disabled and removed widgets from a widget area and replaced it with default widgets. Again, the widget area has the exact same name as the theme I am copying.

    Can anyone shed some light on this?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Mattaton

    (@mattaton)

    Ah, I think I see what happens. I went in and re-associated the custom menus with the locations in the new theme and the classes became menu-item again. Am I correct to say that page-item is for auto menus and menu-item is for custom menus?

    robswarts

    (@robswarts)

    I have a primary menu in the header and when you scroll over it and hold the secondary menus appear and are pages that are as I want them to appear. My question is how do I connect the secondary list of menus so that when you click on the initial primary menu and it takes you to that page my secondary menus are available there?

    Thread Starter Mattaton

    (@mattaton)

    Off-topic, but do you mean you want the secondary pages to be available as the parent page’s contents? I’m fairly new to WP, but I think you’ll need to set this up in your theme as a custom template for the parent page. That’s how I would do it anyway.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thread Starter Mattaton

    (@mattaton)

    Agreed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menus – menu-item vs page-item???’ is closed to new replies.