Posted By

kristarella on 03/02/11


Tagged

wordpress wp thesis thesiswp


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

e11world


Widgetised home page


 / Published in: PHP
 

With this CSS to make the page 2 main content columns: .custom #content .sidebar {width:48%; margin-right:2%; float:left;}

  1. register_sidebars(2,
  2. array(
  3. 'name' => 'Home Column %d',
  4. 'id' => 'home-column-$i',
  5. 'before_widget' => '<li class="widget %2$s" id="%1$s">',
  6. 'after_widget' => '</li>',
  7. 'before_title' => '<h3>',
  8. 'after_title' => '</h3>'
  9. )
  10. );
  11.  
  12. $loopty_loop = new my_loops;
  13.  
  14. class my_loops extends thesis_custom_loop {
  15. function front() {
  16. ?>
  17. <div id="sidebars">
  18. <div id="home_column_1" class="sidebar">
  19. <ul class="sidebar_list">
  20. <?php thesis_default_widget('home-column-1'); ?>
  21. </ul>
  22. </div>
  23. <div id="home_column_2" class="sidebar">
  24. <ul class="sidebar_list">
  25. <?php thesis_default_widget('home-column-2'); ?>
  26. </ul>
  27. </div>
  28. </div>
  29. <?php
  30. }
  31. }

Report this snippet  

You need to login to post a comment.