Adding new sidebars ... messes up configuration
Posted 25 March 2012 - 10:49 PM
I now realise this also happens if you create a new sidebar in a working PageLines environment. Well at least that's true when you do it the way I did which was:
- Added a new Section called "SensorSidebar"
- Implemented section_persistent() and section_template() in the same manner as was done in other side bars (I copied and pasted from primary sidebar 1)
Code is as follows:
I do have my doubts about the "1" parameter being passed into pagelines_register_sidebar. Should this be something else? Will that prevent the cascading problems I'm seeing in terms of widgets association to sidebars?
Posted 26 March 2012 - 10:16 AM
Posted 27 March 2012 - 10:29 AM
Posted 27 March 2012 - 11:17 AM
Posted 27 March 2012 - 01:49 PM
Posted 27 March 2012 - 08:22 PM
The output generated by this function will differ slightly based on whether you have enabled sidebar priorities under PageLines > Settings > Advanced.
With priorities off, you can expect the value you use in the second parameter to establish the sidebar position at the top of the list, then in its relative order based on where it is found in the actual code.
If you turn on sidebar priorities and use these "position" values, you will replace the default sidebar at that position; and the displaced sidebar will be located at the bottom of the sidebar areas.
Using your example would replace the Primary Sidebar; change your example to would replace the "Universal Sidebar".
For reference, the sidebar default priorities are:
1. Primary Sidebar
2. Secondary Sidebar
3. Tertiary Sidebar
4. Universal Sidebar
5. Full Width Sidebar
6. Content Sidebar
7. MoreFoot Left
8. MoreFoot Middle
9. MoreFoot Right
10. Footer Columns Sidebar
Hopefully this will help with sorting out your question.
Posted 27 March 2012 - 09:19 PM
In case my text above is not clear, here's an example:
- let's assume there are three sidebars: primary, secondary, and teriary
- priorities are their defaults (e.g., 1,2, and 3)
- I have assigned the widgets as such:
Now I want to add a fourth sidebar -- let's call it sidebar4 for lack of imagination -- and it will in turn get configured with Widget A, G, and H. Before I get to configuring the new sidebar, however, I need to register it. At this point all things go crazy and while all four sidebars exist, they have a random association of widgets. The new association isn't really random, it follows some pattern but I can't discern what that is at the moment. Why did this happen? Is it due to the rearrangement of priorities in the sidebars? If yes then always prioritising new sidebars at the end might help but it also leaves some concerns as to the robustness of the sidebar container (this is a WP complaint not PL). If no then what is causing this configuration malfunction?
Posted 28 March 2012 - 02:06 AM
Posted 28 March 2012 - 02:11 PM
I believe a picture is worth far more than a 1,000 words so I've created on that shows the destructive process I'm describing. Hope it is clear from this but let me say quickly that I can move back forth between the two states described here by simply adding and/or removing the new sidebar but the priority seems to have no bearing on the chaotic effect of the widgets movement between container sidebar/footer.
Posted 28 March 2012 - 04:17 PM
Posted 28 March 2012 - 08:56 PM
Posted 29 March 2012 - 02:24 AM