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

What's the code for adding a widget area between my blog posts? Specifically I want to put one widget area inbetween after the first 3 posts of my blog?

share|improve this question

This thread - http://wordpress.org/support/topic/how-to-put-adsense-after-first-topic - explains how to add something after the first post so I would assume you could change the 1 to a 3 to have it display after the third?

And this page explains how to add a widgetized area: http://quirm.net/2011/09/15/widgetizing-any-page/

So you would put the php for the dynamic sidebar where the first post tells you to add the adsense code.

share|improve this answer

Just to expand on the above answer, and specifically for Genesis Framework...

  1. Register sidebar (using register_sidebar) so you can place widgets in it. For example:

    register_sidebar( array(  'id' => 'after_post',
     'name' => __( 'After Post', 'childtheme' ),
     'description' => __( 'This is the after post section.', 'childtheme' ),
     'before_widget' => '',
     'after_widget' => ''
  2. Show the sidebar in the genesis_after_post or genesis_after_post_content hook using genesis_widget_area. For example:

    genesis_widget_area( 'after_post', array( 'before' => '' ) );

  3. Style as necessary, i.e. .after-post { ... }

  4. Place text widget, or whatever else, and test.

share|improve this answer

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.