/ Published in: PHP
this is pretty useful if you want to use the wordpress blog system to feed a custom application/site of yours
Expand |
Embed | Plain Text
to test it, put this in "wp-content/themes/[theme name]/header.php" //------------------------------------------------------------- // pagesRecursive // lists pages of a WP recursively //------------------------------------------------------------- function pagesRecursive($parentId, $lvl){ $pages = get_pages($args); if ($pages) { $lvl ++; foreach ($pages as $page) { print "</div>"; pagesRecursive($page->ID, $lvl); } } } pagesRecursive(20, 0);
You need to login to post a comment.
