hempsworth
Member
Posted 16 years ago #
Hi,
I'm currently working on a theme, and followed the guidelines at automattic.com to make my sidebar widget-ready.
However, when I try it out on MU they don't work...
Is it something different in the functions.php file? If so, where can I find this code?
Thanks,
Alex
it's the same code in the functions.php file. What does your specific code say?
hempsworth
Member
Posted 16 years ago #
My functions.php says:
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>
and my sidebar.php says:
<div id="sidebar">
<ul>
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<li>
<h2>Welcome</h2>
Please enable some widgets
</li>
<?php endif; ?>
</ul>
</div><!-- ends #sidebar -->
The sidebar options page isn't showing up in the admin panel.
Try doing this in functions.php
:
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar();
echo "THIS IS JUST A TEST.";
}
?>
If "THIS IS JUST A TEST." doesn't show up anywhere, the Widgets plugin isn't installed properly.
hempsworth
Member
Posted 16 years ago #
It doesn't show up...
Is the sidebar.php code okay, because I'm running a fresh intall of WPMU. The widgets plugin doesn't need to be installed does it?
The widgets plugin doesn't need to be installed does it?
That's probably your problem. :-p
Yes, it needs to be installed. Drop
widgets.php
from the Widgets plugin zip file into your
wp-content/mu-plugins
folder and they'll be enabled for all users.
hempsworth
Member
Posted 16 years ago #
Haha, what an idiot! I though widgets were installed out of the box.
Cheers!