How to: Create Custom Sidebar in Pagelines Framework 2.0
Goal: Add a custom Sidebar to Home page’s “Content” (not Template) area so any Widget can be added.
WordPress framework: PageLines Framework 2.0.1
Solution: Copy one of the Sidebar sections and customize it to fit in the Content area of the Home page template. We’ll copy “Full Width Sidebar” and turn it into a new Sidebar called “Home Page Knowledge Center Sidebar.”
Copy: wp-content/themes/pagelines/sections/sb_fullwidth
To: wp-content/themes/pagelines-template-theme/sections/
Open: wp-content/themes/pagelines-template-theme/sections/sb_fullwidth/sections.php
CHANGE:
<?php /* Section: Full Width Sidebar Author: PageLines Author URI: http://www.pagelines.com Description: Shows full width widgetized sidebar. Class Name: FullWidthSidebar Edition: pro Workswith: templates, footer, morefoot */ class FullWidthSidebar extends PageLinesSection { function section_persistent() { $setup = pagelines_standard_sidebar($this->name, $this->settings['description']); register_sidebar($setup); } function section_template() { pagelines_draw_sidebar($this->id, $this->name); } }
TO:
<?php /* Section: Home Page Knowledge Center Sidebar Author: PageLines + Reid Walley modification http://designparc.com/ Author URI: http://www.pagelines.com Description: Home page Knowledge Center sidebar. Class Name: HomePageKnowledgeCenterSidebar Edition: pro Workswith: main */ class HomePageKnowledgeCenterSidebar extends PageLinesSection { function section_persistent() { $setup = pagelines_standard_sidebar($this->name, $this->settings['description']); register_sidebar($setup); } function section_template() { pagelines_draw_sidebar($this->id, $this->name); } }
Finally: Go to Site admin > PageLines > Store > Sections > Child tab and click Refresh Store.
New Sidebar called Home Page Knowledge Center Sidebar is now available in Site admin > Appearance > Widgets section.