Opened 18 years ago
Closed 18 years ago
#4258 closed defect (bug) (fixed)
Widgets don't show up with new integrated widgets.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | high |
Severity: | normal | Version: | 2.2 |
Component: | General | Keywords: | widgets, dynamic_sidebar |
Focuses: | Cc: |
Description
Although all Widgets are shown nicely under presentaion tab, they don't show up in the blog if you register your sidebars using names instead of the default numbers.
If you use:
register_sidebar(array('name'=>'Sidebar-Column1'));
You can't use:
dynamic_sidebar('Sidebar-Top');
to show Widgets. Only by using numbered Sidebars (SIdebar1, Sidebar2 etc.) it works.
(btw I am using a german locale).
Change History (16)
#3
@
18 years ago
Ok, that formatting is screwed. Lets try again:
if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<div id="%1$s" class="widget wide %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="title">', 'after_title' => '</h2>', 'name' => 'Full width - top' ) );
and
<?php if ( !function_exists('dynamic_sidebar') !dynamic_sidebar('Full width - top') ) : ?>
#4
@
18 years ago
The sidebar ID is being created differently, so the new code doesn't see the old sidebar. Working on a fix.
#12
@
18 years ago
- Milestone changed from 2.2 to 2.2.2
- Resolution fixed deleted
- Status changed from closed to reopened
this is still not working for me, using SVN. i've got another user running into the problem with the release version of 2.2
my environment: http://archgfx.net/phpinfo.php
widget call in my theme:
http://disconnected.svn.sourceforge.net/viewvc/disconnected/Trunk/functions.php?revision=50&view=markup#l_129
I can confirm that this is indeed a problem, even in the latest revision of 2.2 r5466. I tested on an existing widgetized 2.1.3 blog with a custom theme that has no id paramter, only a name parameter. The name paramter is respected in terms of name, but widget are not properly placed in the sidebars. In fact it's as if the widgetized sidebar did not exist. As an example, in this case, in %theme%/functions.php we use:
`if ( function_exists('register_sidebar') )
and in the sidebar.php:
` <?php if ( !function_exists('dynamic_sidebar')