Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to rename "Widget" to something else

Like "Block" or something else.

please help me.

EDIT

Per the user's comment below, she wants to change class="widget" to class="block" (or any arbitrary class name) in the rendered, sidebar Widget.

share|improve this question
1  
We need considerably more information, if we are to hope to help you here... –  Chip Bennett Oct 25 '11 at 14:53
    
want to rename "class="widget" to class="Block" in sidebar –  user8503 Oct 25 '11 at 14:58

1 Answer 1

up vote 1 down vote accepted

The classes assigned to rendered Widgets are specified by the argument array passed to the register_sidebar() call used to register the sidebar. e.g.:

<?php 
    $args = array(
        'name'          => sprintf(__('Sidebar %d'), $i ),
        'id'            => 'sidebar-$i',
        'description'   => '',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget'  => '</li>',
        'before_title'  => '<h2 class="widgettitle">',
        'after_title'   => '</h2>' ); 
?>

See the before_widget parameter:

'before_widget' => '<li id="%1$s" class="widget %2$s">'

...change it accordingly, e.g. to:

'before_widget' => '<li id="%1$s" class="block %2$s">'
share|improve this answer
    
thanks a lot Chip Bennett –  user8503 Oct 25 '11 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.