Posted By

depiction on 02/13/13


Tagged


Versions (?)

WordPress: Store dynamic_sidebar in a variable


 / Published in: PHP
 

URL: http://wordpress.stackexchange.com/questions/22943/how-do-i-get-sidebar-into-a-varaible

Store dynamic_sidebar in a variable using PHP's object buffering control.

  1. dynamic_sidebar('sidebar-id');
  2. $sidebar = ob_get_contents();

Report this snippet  

You need to login to post a comment.