Today I came across a weird situation: I needed to place a navigation menu in the content of a page. A shortcode was the obvious solution, but there doesn't appear to be one built in for menus. I created this one very quickly: Place this in functions.php, then use [menu … [Read more...] about Call a navigation menu using a shortcode
Navigation
Listing children on empty pages as a filter
Yesterday, I showed you how to automatically list child pages if a page's content is empty. That code would go in your theme's page.php file. What if you wanted to use it in any theme? The best solution is to turn it into a little plugin: Paste the code into a file in your … [Read more...] about Listing children on empty pages as a filter
Including external links in WordPress navigation menus
Sometimes you need to link to something other than a WordPress page in your navigation menu. Perhaps you've built a photo gallery in ZenPhoto. How do you get it into your menu without hand-coding all your links? The Page Links To plugin allows you to do just that. Install the … [Read more...] about Including external links in WordPress navigation menus
Listing child pages
The Codex offers a way to list the children of the current page by adding this to your theme: … [Read more...] about Listing child pages
Ordering pages
Ordering pages in WordPress is a huge pain. The developers acknowledge this with a little message on the Edit Page screen: "We know this is a little janky, it'll be better in future releases." The Quick Edit feature makes it a little easier, but you still have to edit lots of … [Read more...] about Ordering pages
Previous and Next links for pages
Ever want to let your visitors browse your pages in order? You've probably discovered that previous_posts_link and next_posts_link don't work on pages. I've written a plugin, Next Page, to solve the problem. You'll get an options screen allowing you to specify the language of … [Read more...] about Previous and Next links for pages