"Auto add pages" and "theme locations" database entries don't seem to trans
-
This has had me scratching my head for a couple of years now (so it’s definitely not a WP version thing).
When I go to move a site, copy a site, or for any other reason import a database using the familiar phpMyadmin import process, I always have to go into Appearance > Menus and reassign the nav menu. Also, it seems like “auto add pages” is set to “yes”, although the box remains unchecked.
Specific example. A site that exists on a local server (dev environment in this case) needs a database import from the remote (live) site.
Upon successful import, everything is fine except the nav menu does not look anything like the live site. It appears that it’s not actually using the nav menu (although said menu, here named “Main Menu”, does exist in Appearance > Menus). Instead it’s just showing all top-level pages, which is what is *should* do if no nav menu is selected presumably.
So, live site has “auto add pages” unchecked and “theme locations” has only one option, “Primary Menu”, and this is checked.
Newly-DB-updated dev site has both boxes unchecked.
But then in the DB itself, I see this:
INSERT INTO wp_options VALUES(“157″,”theme_mods_grayff”, [bunch of stuff that is not pertinent] “nav_menu_locations\”;a:1:{s:7:\”primary\”;i:2;} [more stuff]
“nav_menu_locations” appears to be set as “primary” — which is correct, yet the box is unchecked and the site is not using this menu.
Then, there’s also this:
INSERT INTO wp_options VALUES(“159″,”nav_menu_options”,”a:2:{i:0;b:0;s:8:\”auto_add\”;a:0:{}}”,”yes”);
And that appears to indicate that “auto add pages” should be checked as well, but it is not.
Anyone have a clue as to what is happening here and why?
- The topic ‘"Auto add pages" and "theme locations" database entries don't seem to trans’ is closed to new replies.