I’m trying to include this plug-in:
http://wordpress.org/extend/plugins/sidebar-generator/
Into my wordpress theme. As many people around the internet said, I just included the sidebar_generator.php file into my functions.php. The ‘Sidebars’ menu appears under appearance, but no matter what I do, If I click on it nothing happens (just like it was linked on a ‘#’).
If I install the plug-in through the wordpress interface everything works, I need to have it integrated though.
Any help?
Thank you
You shouldn’t need a plugin to have extra sidebars. You should be able to build a theme template with as many sidebars as you want. When I’m creating a custom theme in WordPress I use a variation of the 960 CSS Grid (another good one is the newer 1140px CSS Grid System, which is fluid).
To register your sidebars to accept widgets, insert this code in your functions.php file:
}
In this case, I have a registered sidebar for just the blog, then one each for a right sidebar and a left sidebar.
In my theme directory I have three sidebar.php files. The blog sidebar file is the default sidebar.php file. The other two are named sidebar-left.php and sidebar-right.php. Each sidebar has it’s appropriate code as follows:
Wrap this code inside your divs in the sidebar and be sure you change the ‘blog-sidebar’ name to the one for each sidebar.
Looking for function
admin_menu
and edit in that line. Just replace__FILE__
bysidebar-generator
.Interpretation: If you use sidebar generator as a plugin,
__FILE__
meanssidebar-generator
, but if you include it in some directory of your themes, the constant__FILE__
may change to something different (such as inc, includes… or something else)