How could child theme be different than parent theme if I haven’t made changes?

I made a child theme defined as so:

/*
Theme Name: GlenTheme
Description: Modified Gallery 2.3 theme
Template: gallery
*/

@import url("../gallery/style.css");

The only file in the child theme is this style.css

Read More

Within the menu, though, the markup is coming up differently:
in the child theme the menu comes out like this (partially):

  <div id="menu" class="dropdown">
  <div class="home"><ul><li class="page_item page-item-5057">

While in the parent theme it comes out like this:

  <div id="menu" class="dropdown">
  <ul id="nav" class="home"><li id="menu-item-5049" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-5049">

As I understand parent-child themes they should be identical, but clearly something in the markup is getting changed, the code governing this is the menu function..

I could obviously rewrite the menu styles to make them apply properly to the different markup, but I really want to know why there’s any different markup in the first place!

Related posts

Leave a Reply

1 comment

  1. This is possibly because you had a menu assigned, then you changed themes, and now there is no longer a menu assigned. Because WordPress generates slightly different html for an assigned menu than for an autogenerated menu, this is likely why you have the issue.

    For example, on a theme of mine Im developing, if I changed them and back the menu was pushed down 20 pixels, which was gone when I assigned my header menu, some tweaked CSS rules corrected the issue.