Posted By

scitrenbaumgmailcom on 07/12/10


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

zlojkashtan
manavecplan
mikoli


Split wordpress content into 2 or more column


 / Published in: PHP
 

  1. Add the following code to your functions.php
  2.  
  3.  
  4. <?php
  5.  
  6. // original content display
  7.  
  8. // the_content('<p>Read the rest of this page ยป');
  9.  
  10. // split content into array
  11.  
  12. $content = split_content();
  13.  
  14. // output first content sections in column1
  15.  
  16. echo '<div id="column1">', $content[0], '</div>';
  17.  
  18. // output remaining content sections in column2
  19.  
  20. echo '<div id="column2">', implode(array_shift($content)), '</div>';
  21.  
  22. ?>

Report this snippet  

You need to login to post a comment.