Left sidebar not appearing: "The Nav container has no containing elements"
Mariann Davis wrote: My left sidebar appears on my Post pages.
But on my Page pages i get this javascript error:
Uncaught Error: The Nav container has no containing elements
at o (scripts.js:2385)
at new v (scripts.js:2385)
at d (scripts.js:2385)
at HTMLDocument.<anonymous> ((index):435)
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.J (jquery.min.js:2)The Nav container has no containing elements
What do i have set up incorrectly?
the site ishttp://uucsjs.org/
Comments (1)
Naomi Moon wrote two years ago:
Did you set the pages up to have parent pages? that is the way the left side menu populates.
Anonymous wrote:
Mariann replied: yes they do, but even if they didn’t, why the JS error?
wait, they have a parent in the menu, but no parent _page._
how do i get a left sidebar to show up regardless?and why does it show up on Posts?
Naomi Moon wrote:
For elements to show up in the Left Sidebar of a Page, you have to assign the pages as a child to a parent page. You can do this on the Pages screen. Quick Edit each page and ensure that it is assigned to its appropriate parent. You can also set the order of the left menu by setting the order property of the page after you select the parent.
margy wrote:
Adding or moving pages on the main menu is a two-step process:
1. Edit the page and specify what menu it goes on. When you save the page, WordPress creates the URL to that page.
2. Edit the main menu and put the page where it goes.Maybe you aren’t doing the second step?
kevinvess wrote:
Based on your page URL structure, it looks like you have not setup parent pages for the sidebar to display child page links.
For example, this is your current Sunday Services page URL under the Worship section: http://uucsjs.org/sunday-services/
The example page URL above should be structured as the following:
http://uucsjs.org/worship/sunday-services/
To configure your parent pages, you’ll need to create a page for your top-level pages, i.e. “Worship” (if you haven’t already). Next, you’ll need to follow these steps to setup your child pages:
- Edit your child page from the Pages admin panel, i.e. Sunday Services.
- In the right sidebar, click the “Page Parent” drop-down menu. The drop-down menu contains a list of all the Pages already created for your site.
- Select the appropriate parent Page from the drop-down menu to make the current Page a child Page. For example, select the “Worship” page if you’re editing the “Sunday Services” page.
Keep in mind, this will change your current URLs to include their parent page in the URL structure. You may also need to configure URL redirects from the current URL (without parent page) to the new URL (with parent page) to ensure users find the right page.
As for the JS error– you’re correct that shouldn’t happen when pages have no sidebar navigation or child page links. UUA Theme should take note of that issue and look into fixing it for the next release.