viwiv
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Condtional tags in WidgetHello,
1. I am sorry for the spelling mistakes in the title of the question.
2. I eventually found my personal, but functional solution, to implement the conditional tags in Widgets of my theme under construction. ??
So my problem is solved.
Thank you.
V.
Forum: Fixing WordPress
In reply to: How to internationalize number formatOk! Resolved!
… With replace…
if (0 < $numtags) $numtags = number_format($numtags , 0, ',', ' ');
by…
if (0 < $numtags) $numcats= number_format_i18n($numtags);
Great!
V.
Forum: Themes and Templates
In reply to: Choose location of custom fieldThanks, Michael.
V.
Forum: Themes and Templates
In reply to: dynamic_sidebar WoesI found the solution in theme “Options” written by Justin Tadlock. To respect copyright, I will not publish the solution here… but it exists!
Forum: Themes and Templates
In reply to: dynamic_sidebar WoesHi,
These methods are very interesting, but doesn’t work on my side… Due to the 2.7 version of WordPress?
I use this code in functions.php:
function is_sidebar_active( $index = 1){ $sidebars = wp_get_sidebars_widgets(); $key = (string) 'sidebar-'.$index; return (isset($sidebars[$key])); ] register_sidebar(array('name'=>'header_right', 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); register_sidebar(array('name'=>'header_bottom', 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', ));
I use this code in header.php:
if ( function_exists('dynamic_sidebar') && is_sidebar_active(1) ) { echo '<ul id="widget_header_right">'. "\n"; dynamic_sidebar(1); echo '</ul>'. "\n"; } else { } ... if ( function_exists('dynamic_sidebar') && is_sidebar_active(2) ) { echo '<ul id="widget_header_bottom">'. "\n"; dynamic_sidebar(2); echo '</ul>'. "\n"; } else { }
When dynamic-sidebar(2) is empty, ul element displays!
I check my datatabase in wp-options. Sidebar_widgets displays:
a:3:{s:9:"sidebar-1";a:1:{i:0;s:6:"images";}s:9:"sidebar-2";a:0:{}s:13:"array_version";i:3;}
Thanks for your help!!!
Forum: Fixing WordPress
In reply to: How to internationalize this string?Moshu,
Thank you very much! ??
Sincerely,
Vincent