Jump to content
Sign in to follow this  
phxreguy

Adding a second Full Width sidebar to PlatformPro

Recommended Posts

phxreguy

Greetings! First, allow me to say I'm freaking in LOVE with PlatformPro! I'm trying to add a second "full width sidebar" to the feature page template. I though I could use section.sb.fullwidth.php and just change some of the names and whatnot to reflect a second sidebar, rename it something like section.sb.fullwidth2.php and I'd be good to go. But I can't get anything to show up in template setup page. The site I'm working on is here: http://jaytestsite.info I have one full width sidebar in place, but would like to add a second one at the bottom of the page to act as a small footer with a copyright notice. Any thoughts? Be gentle, I'm a php noob.

Share this post


Link to post
Share on other sites
phxreguy

I was able to get the effect I was looking for by using both the Universal Sidebar and the Full Width sidebar. But I'd still be interested in learning what I'm doing wrong in adding a second full width sidebar section...

Share this post


Link to post
Share on other sites
cmunns

Did you register the section in the functions.php file? Also, you're adding this section via the child theme or no?

Share this post


Link to post
Share on other sites
phxreguy

cmunns - yes, I registered it in functions.php and am adding via platformbase.

Share this post


Link to post
Share on other sites
scottd

I am also interested in adding a second fullwidth sidebar to my child theme. What steps would I need to take to accomplish this?

Share this post


Link to post
Share on other sites
kinek

If you register it correctly in the functions.php file in the base theme and correctly change the classes in the section.sb.fullwidth2.php file it will show up... To my understanding there could be two things you are doing wrong. You could be uploading the section.sb.fullwidth2.php in teh pro theme instead of uploading it in the sections folder in the base theme. The other would be that you haven't updated the necessary changes inside the section.sb.fullwidth2.php file. Your going to have to change the class and the name inside that file to reflect what you registered in the functions.php file. I hope this helps :)

Share this post


Link to post
Share on other sites
phxreguy

Thank Jeremy! I wasn't putting into the sections folder in the base theme. Therein lied the problem.

Share this post


Link to post
Share on other sites
phxreguy

@scott - here is how I got a second fullwidth section to work: 1) Copied section.sb_fullwidth.php. Renamed it section.sb_fullwidth2.php. 2) Edited section.sb_fullwidth2.php to this:

<?php
	/*
	
		Section: Full Width Sidebar 2
		Author: Andrew Powers
		Description: Shows full width widgetized sidebar
		Version: 1.0.0
	
	*/
	
	class FullWidthSidebar2 extends PageLinesSection {
	
	   function __construct( $registered_settings = array() ) {
	
			$name = __('Full Width Sidebar 2', 'pagelines');
			$id = 'fullwidth_sidebar_2';
			$this->handle = "Full Width Sidebar 2";
	
			$settings = array(
				'description' 	=> __('A second widgetized full width sidebar. This sidebar will span the entire width of your website.', 'pagelines'),
				'workswith' 	=> array('templates', 'footer', 'morefoot'),
				'folder' 		=> '',
				'init_file' 	=> 'fullwidth_sidebar.php',
				'icon'			=> CORE_IMAGES . '/admin/sidebar.png',
				'version'		=> 'pro'
			);
	
		   parent:GDN__construct($name, $id, $settings);
	   }
	
	   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);
		}
	
	}
	
	/*
		End of section class
	*/
3) Placed the new section.sb_fullwidth2.php file in platformbase/sections folder. 4) Added this to functions.php (in the function base_sections area):
pagelines_register_section('FullWidthSidebar2', 'sb_fullwidth2', null, array('child' => true) );

Hope that helps!

Share this post


Link to post
Share on other sites
scottd

Thank you guys for outlining the steps to accomplish this, that was a big help! Jay, I really appreciate you providing the code. It worked like a champ! Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×