Support » Plugins » List pages in two columns

  • Hi,

    I’m using the code below to display a list of pages in two column, with specific meta key.
    Works fine but when I repeat the code to display second set of pages with different meta key (custom field) it includes pages from first loop as well.
    I need to run several sets of page lists with different meta keys.
    How can I fix this?


    Here is the code:

    $page_s = explode("</li>",wp_list_pages('title_li=&meta_key=series&meta_value=three&echo=0&depth=1&style=none'));
    $page_n = count($page_s) - 1;
    $page_col = round($page_n / 2);
    for ($i=0;$i<$page_n;$i++){
     if ($i<$page_col){
      $page_left = $page_left.''.$page_s[$i]."</li>";
     elseif ($i>=$page_col){
      $page_right = $page_right.''.$page_s[$i]."</li>";
    <h3>3 Series</h3>
    <ul id="twocol_list_left">
    <?php echo $page_left; ?>
    <ul id="twocol_list_right">
    <?php echo $page_right; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List pages in two columns’ is closed to new replies.