<?php/* Display pages in 2 columns */// all the pages to go in the footer by ID$footerpagesids=array(9,17,21,17,6,114,116,127,25,26,30,29,39,2247,2830);// Amount of pages (count of items in array)$results_total=count($footerpagesids);// How many pages to show per list (round up total divided by 3)$pages_per_list=ceil($results_total/2);// Counter number for tagging onto each list$list_number=1;// Set the page result counter to zero$result_number=0;?><ulclass="footer-pages"id="pg-col-<?phpecho$list_number;?>"><?phpforeach($footerpagesidsas$footerpagesid){$result_number++;if($result_number%$pages_per_list==0){$list_number++;echo'<li><a href="'.get_the_permalink($footerpagesid).'">'.get_the_title($footerpagesid).'</a></li></ul><ul class="footer-pages" id="pg-col-'.$list_number.'">';}else{echo'<li><a href="'.get_the_permalink($footerpagesid).'">'.get_the_title($footerpagesid).'</a></li>';}}?>
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.