This plugin is intended to be useful for template developers
New in version 0.4
- added ‘object’ (page object) in every $default_theme_pages item for fast access.
- added all default pages to wp toolbar, inside ‘site name’, to increase user experience.
How to use
Add this code in your functions.php.
Tips
- After the pages are created automatically, you can change their title and slug without problem.
- If you add an
optionnames:page_on_frontandpage_for_posts, you will block the home-page and the blog-page on your site.
Templating
You can template using ID or name (setted up in $default_theme_pages global variable ), something like:
page-131.php or page-contact.php (If you change the page slug, this will still work because ‘contact’ was defined as pagename if $default_theme_pages global variable).
For detect if you’re in that page:
Getting a default page id:
This method is more quick than get_page_by_path because page ID is stored on global variable.

评论0