bu-navigation icon indicating copy to clipboard operation
bu-navigation copied to clipboard

Allow using bu_links in get_pages and wp_list_pages

Open hadamlenz opened this issue 6 years ago • 0 comments

We created our nav without BU Navigation in mind. In order to use bu_links in our navigation we needed to add a filter to get the bu_links posts and add them into the $pages array, then sort. A developer must add add_bu_links = true to the args of get_pages() or wp_list_pages() in order for it to work, and so it is backward compatible.

I created a gist bu-navigation-external-links-get-pages.php

This would go well at the bottom of extras/bu-navigation-external-links.php. It does not account for all of the possible options added to get_pages or wp_list_pages. Will submit a pull request if you like

hadamlenz avatar Mar 27 '18 17:03 hadamlenz