• I used this to register a new sidebar

    // Adds Sidebar Widgets as a widget area
        if (function_exists('register_sidebar')) {
        	register_sidebar(array(
        		'name' => 'Sidebar Widgets',
        		'id'   => 'sidebar-widgets',
        		'description'   => 'These are widgets for the sidebar.',
        		'before_widget' => '<li class="widget_item"><div id="%1$s" class="widget %2$s">',
        		'after_widget'  => '</div></li>',
        		'before_title'  => '<p class="widget_title">',
        		'after_title'   => '</p>'
    
        	));
        }

    I was wondering could I add more fields to it? I want
    ‘before_content’ and ‘after_content’ so I can style the content individually from the title. Is this possible? how can I achieve this?

    Thanks WP community!

  • The topic ‘Register sidebar with extra fields?’ is closed to new replies.