What is the difference with get_sidebar and dynamic_sidebar?

What is the difference with get_sidebar() and dynamic_sidebar()?

I was wondering which one I should use. Maybe one use widgets and the other one doesn’t?


Please refer to the get_sidebar() and dynamic_sidebar() Codex entries.

The get_sidebar( $slug ) template tag includes the sidebar-$slug.php template-part file.

The dynamic_sidebar( $slug ) template tag outputs the $slug dynamic sidebar, as defined by register_sidebar( array( 'id' => $slug ) ).

Leave a Comment