Jump to content
benz_admin

Hot to Add a Custom Sidebars

Recommended Posts

benz_admin    0
benz_admin

Hi to all,

I try to follow this istruction http://www.pagelines.com/wiki/How_to_Add_Custom_Sidebars but:

 

- I can't find the Sidebar Prority option http://www.pagelines.com/wiki/images/5/50/Sidebar-Priority.png on Dashboard>Pagelines>Site Option>Advanced

- on Appearence>Widget my custom sidebar doen't appear

 

How can I solve it?

thanks

Share this post


Link to post
Share on other sites
Rob    547
Rob

Buongiorno Michel,

 

I'm unsure why you do not see the Enable Priorities option.  Could you tell me which version of PageLines Framework you are using?  You can find out at Dashboard  Appearance > Themes

 

Enabling priorities though will only sort the order of widgets in the sidebars, making sure they do not become disorganized.  If they do, the solution is simply to move them up or down between sidebars to place them back where they belong.  So, the priorities are not critical or have anything to do with creating the custom sidebar.

 

Beyond the issue of enabling the priorities, did you implement anything else in the instructions for creating custom sidebars?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
benz_admin    0
benz_admin

Ciao Rob, :)

my pagelines framework version is 2.3.8.

 

I just followed the Custom Sidebars guide.... http://www.pagelines.com/wiki/How_to_Add_Custom_Sidebars

So:

- I created a new folder via FTP in public_html/wp-content/themes/pagelines/sections and I renamed It sb_custom

- I created a section.php file and I put it into the new folder

- I copied a icon.png file from another sidebar

 

this is the php file content:

 

class MyCustomSidebar extends PageLinesSection {
   function section_template() {
         pagelines_draw_sidebar($this->id, $this->name, '');
    }
}

Share this post


Link to post
Share on other sites
smv_usdam    1
smv_usdam

Hi,

I'm using pro version 2.4.

I also can't find the sidebar priority option mentioned. It's not there. Maybe it used to be there in earlier versions ?

I also followed the custom sidebars guide in the wiki quoted above, but I created the new folder in /plugins/pagelines-sections/ instead of /themes/pagelines/sections and I used the whole code provided in the wiki for sections.php:

 

 

class MyCustomSidebar extends PageLinesSection {

/** PHP that always loads no matter if section is added or not. */
function section_persistent() {
$setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
pagelines_register_sidebar($setup, 100);
}

/** Section template. */
function section_template() {
pagelines_draw_sidebar($this->id, $this->name, '');
}
}

 

 

This worked for me.

It might be because of the part "pagelines_register_sidebar" etc. which for some reason unknown to me is missing in the current core pagelines sidebar section.php files.

 

Hope this helps ;-)

Share this post


Link to post
Share on other sites
benz_admin    0
benz_admin

Thanks for your help Newbie,

I tryed to follow your instruction but it doesn't work for me!

I empty the browser cache and re-open Dashboard>Appearance>Widget but i don't find any new sidebar.

 

Have I to do anything else?

Share this post


Link to post
Share on other sites
Rob    547
Rob

Buona notte,

 

The custom section, if you followed the instructions carefully here: http://www.pagelines.com/wiki/How_to_Add_Custom_Sidebars may not appear in Dashboard > Appearance > Widgets if you did not place it into a template.  WordPress doesn't know it exists.

 

How did you edit/create the section?  Could you provide us a step-by-step list of what you did?

 

Mille grazie!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
benz_admin    0
benz_admin

This is what i have done:
- I created a new folder called sb_custom in wp-content/themes/pagelines/sections
- I copied a icon.png file from another sidebar and I inserted it into the folder
- I inserted into this folder a section.php file

 

this is the php file content:

 

<?php
/*
    Section: Custom Sidebar
    Author: PageLines
    Author URI: http://www.pagelines.com
    Description: The main widgetized sidebar.
    Class Name: CustomSidebar    
    Workswith: sidebar1, sidebar2, sidebar_wrap
    Persistant: true
*/

/**
 * Custom Sidebar Section
 *
 * @package PageLines Framework
 * @author PageLines
*/
class CustomSidebar extends PageLinesSection {

    /**
    * Section template.
    */
   function section_template() {
          pagelines_draw_sidebar($this->id, $this->name, 'includes/widgets.default');
    }

}

 

This is exatcly what I have done!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

I haven't tested this personally but I think you may have uploaded the section to the wrong location,

 

instead of:

 

wp-content/themes/pagelines/sections/

 

upload it here;

 

wp-content/plugins/pagelines-sections/

 

and see if that resolves your issue.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
benz_admin    0
benz_admin

smv_usdam said it to me on 28 January and I tryed it but it didn't work.

 

can you confirm that the only steps to do are these that I described on this post?

 

This is what i have done:
- I created a new folder called sb_custom in wp-content/themes/pagelines/sections
- I copied a icon.png file from another sidebar and I inserted it into the folder
- I inserted into this folder a section.php file

 

this is the php file content:

 

<?php
/*
    Section: Custom Sidebar
    Author: PageLines
    Author URI: http://www.pagelines.com
    Description: The main widgetized sidebar.
    Class Name: CustomSidebar    
    Workswith: sidebar1, sidebar2, sidebar_wrap
    Persistant: true
*/

/**
 * Custom Sidebar Section
 *
 * @package PageLines Framework
 * @author PageLines
*/
class CustomSidebar extends PageLinesSection {

    /**
    * Section template.
    */
   function section_template() {
          pagelines_draw_sidebar($this->id, $this->name, 'includes/widgets.default');
    }

}

 

This is exatcly what I have done!

 

the custom sidebar should appear on Appearance>Widget on the right sidebar list?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

I followed the instructions and have a new sidebar on my test site.

 

I created a sidebar called Blog, I have pasted the code I used below, you can use this to see what went wrong with yours.

 

http://paste.pagelines.com/9zo


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
netage    5
netage

Thank you, it worked.

 

Regards,

Cait

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


×