Hook into 'dynamic_sidebar' and count how often it is called.
Not tested!
add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr() { static $counter = 0; if ( 0 !== $counter && 0 === $counter % 3 ) echo '<hr>'; $counter += 1; } Hook into 'dynamic_sidebar' and count how often it is called.
Not tested!
add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr() { static $counter = 0; if ( 0 !== $counter && 0 === $counter % 3 ) echo '<hr>'; $counter += 1; }