Creating a Dynamic Sidebar on WP

Creating a Dynamic Sidebar on WP

Creating a new sidebar is useful many times

The HTML

screen90

The Registered Widget to Mimic HTML Above

screen91

The Replaced HTML Code

screen93

The Backend Code

screen94

function archiveblog_sidebars() {

	$args = array(
		'id'            => 'archiveblog',
		'class'         => 'archiveblog',
		'name'          => __( 'Blog Archive', 'text_domain' ),
		'description'   => __( 'Used to display Blog Archives', 'text_domain' ),
		'before_title'  => '

', 'after_title' => '

', 'before_widget' => '', ); register_sidebar( $args ); } add_action( 'widgets_init', 'archiveblog_sidebars' );

Leave a Reply

Your email address will not be published. Required fields are marked *