/ Published in: PHP
If you have your wordpress subpages organized by parent pages... and you dont want the parent pages "clickable" this will fix you right up...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Place this section in your functions.php <?php function removeParentLinks() { $pages = wp_list_pages('echo=0&title_li='); $count = 0; foreach($pages as $page) { } } $pages[$count] = $page; $count++; } echo $pages; } ?> // Now just replace your wp_list_pages(); function with removeParentLinks(); //and away you go.
URL: http://bavotasan.com/tutorials/how-to-remove-the-links-to-parent-pages-in-the-wordpress-page-list/