WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way that i can place a certain widget any where on the site.

For example:

I'm using the text widget in my sidebar, for the title i put youtube, and i placed the youtube embed code in it.

But i want that widget to go at the top of the site how do i make this possible, while still using the widgets menu, but not show up in the sidebar, but wherever i place it?

If it's not possible, does anyone know of a youtube sidebar widget, one that can let you place the widget code anywhere on the site and also do it from the widgets menu.

share|improve this question
you need to create a custom widget area in your theme , and then in the widgets menu assign the widget to that area. – krembo99 Mar 9 '12 at 2:59
up vote 1 down vote accepted

Just register another widget area. Don’t take the name sidebar literally, you can use the fields anywhere on your page.

In your theme’s functions.php:

add_action( 'after_setup_theme', 'register_multiple_widget_areas' );

function register_multiple_widget_areas()
        'name'          => 'Sidebar',
        'id'            => 'sidebar',
        'description'   => 'describe the function of the box.'
        'name'          => 'Header',
        'id'            => 'header-widget',
        'description'   => 'Goes at the top of the page.'

And wherever you need the header widget call:

dynamic_sidebar( 'header-widget' );

See also register_sidebar() and dynamic_sidebar().

share|improve this answer
Thank you, worked like a charm – Terrell Anderson Mar 9 '12 at 9:38

You can use the_widget():

        'title'    => __( 'Archives', 'your-textdomain' ),
        'count'    => true,
        'dropdown' => true,
        'before_widget' => '<section class="widget__container">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget__title">',
        'after_title'   => '</h2>',
share|improve this answer
and add what to it, the title of the text widget? – Terrell Anderson Mar 9 '12 at 0:05
I guess you need to re-write your Q. I'm not quite sure if I understand. – kaiser Mar 9 '12 at 1:12
details. arguments. – ahnbizcad Mar 25 at 2:19

Your Answer


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.