Custom wp_list_pages
-
Hello everyone,
just got back into coding but it’s more like riding a unicycle than a bicycle.
I’ve run into a bit of trouble with this piece of code:
code`
$pages = get_pages();
foreach ($pages as $page){
$navigation = ‘<li><a class=”‘ . $page->post_title . ‘ ‘ . if(wp_title(‘ ‘, false)){echo ‘current-page-item’} . ‘” href=”‘ . get_page_link($page->ID) . ‘”>’ . $page->post_title .'</a></li>’ . “\n”;
echo $navigation;}`I’ve been trying to create custom classes in the wp_list_pages that relate to the page names but I can’t figure / find a post about it.
Is there an easy way to do this with wp_list_pages?
Thanx for looking,
Sam
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom wp_list_pages’ is closed to new replies.