Forums
Forums / Themes and Templates / PHP code for widgets
(@angelebaby)
10 years, 2 months ago
I’m trying to figure out how to code in a sidebar widget in this piece of code
<?php if ( ! dynamic_sidebar( 'sidebar' ) ) : // If the user hasn't defined any specific widgets in the admin yet, display a couple dummy widgets, as written below ?> <aside id="archives" class="widget"> <h3 class="side-title"><?php _e( 'Archives', 'naked' ); // WordPress archives widget ?></h3> <ul> <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> </ul> </aside> <aside id="meta" class="widget"> <h3 class="side-title"><?php _e( 'Meta', 'naked' ); // WordPress meta widget ?></h3> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </aside>
Thanks! My site: angelebaby.com
The topic ‘PHP code for widgets’ is closed to new replies.