Jump to content


Photo
- - - - -

Adding A Custom Sidebar

sidebar

Best Answer Danny , 11 March 2013 - 10:29 AM

Hi Cait,

 

If you view the last post in the following topic, it has code attached that will create a custom sidebar called Blog.

 

http://www.pagelines...ustom-sidebars/

 

1. Copy the code on the last topic to a text file and save the file with the following name section.php

2. Now create a folder called sb-blog

3. Add the section.php file to the sb-blog folder

4. Now you will need to use your favourite FTP client and connect to your site.

5. Then navigate to the following directory.

 

wp-content/themes/pagelines-template-theme/sections/

 

Note: If you have renamed, the child theme, then navigate there instead.

 

6. Once there, upload the folder sb-blog to the sections folder.

Once the upload has completed, go to Appearance > Widgets and there should be a sidebar called Blog, which you can add your widgets to.

 

Now navigate to PageLInes > Drag & Drop and click Wrap, SB1 or SB2 and drag and drop the Blog section into the Active Sections.

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 netage

netage

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 11 March 2013 - 09:22 AM

Hi,

 

Please can someone tell me how to create additional sidebars... 

 

Regards,

Cait



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 March 2013 - 10:29 AM   Best Answer

Hi Cait,

 

If you view the last post in the following topic, it has code attached that will create a custom sidebar called Blog.

 

Please Login or Register to see this Hidden Content

 

1. Copy the code on the last topic to a text file and save the file with the following name section.php

2. Now create a folder called sb-blog

3. Add the section.php file to the sb-blog folder

4. Now you will need to use your favourite FTP client and connect to your site.

5. Then navigate to the following directory.

 

wp-content/themes/pagelines-template-theme/sections/

 

Note: If you have renamed, the child theme, then navigate there instead.

 

6. Once there, upload the folder sb-blog to the sections folder.

Once the upload has completed, go to Appearance > Widgets and there should be a sidebar called Blog, which you can add your widgets to.

 

Now navigate to PageLInes > Drag & Drop and click Wrap, SB1 or SB2 and drag and drop the Blog section into the Active Sections.



#3 netage

netage

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 11 March 2013 - 10:54 AM

Thank you, it worked.

 

Regards,

Cait



#4 netage

netage

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 12 March 2013 - 11:54 AM

Hi,

 

Now how would I add more than 1?

 

Regards,

Cait



#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 12 March 2013 - 12:18 PM

What you will need to do is copy the folder you have for your custom Sidebar and then do the following:

 

You need to change the folder name, so that it is different to other custom sidebars.

You will also need to change the following lines in the section.php file, change Blog Sidebar and BlogSidebar to something unique.

 

 

Please Login or Register to see this Hidden Content

 

And also change the value here

 

Please Login or Register to see this Hidden Content

To something unique, I recommend you use a higher value rather than going lower for example, 110, 120, 130 etc...



#6 netage

netage

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 12 March 2013 - 01:01 PM

This is what is in the file

 

 

 

Please Login or Register to see this Hidden Content

It is not working... Can you tell me what's wrong with it?

 

Also where do I go to change the sidebar priority, maybe that's the problem?



#7 netage

netage

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 12 March 2013 - 02:01 PM

I have also tried ($setup, 110)



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 13 March 2013 - 08:58 AM

Hi Cait,

 

You have an error in your custom sidebars code, which can be seen below.

 

Class Name: BEESidebar

 

 

class BeeSidebar extends PageLinesSection {
 
The Class names are different, fix this and your custom sidebar should work. I have now marked this topic as resolved.






Also tagged with one or more of these keywords: sidebar