Monday, November 17, 2008

Hack WordPress

Hack WordPress

New Page Menu Function & Sticky Posts in WordPress 2.7

Posted: 17 Nov 2008 02:00 AM CST

If you are a theme author, there is a lot of work to do to prepare for WordPress 2.7.   The comments.php will need to be revamped to take advantage of the new features, but there are also a lot of other things which are changing as well.  These changes are for the better, but are kind of a hassle for the time being.

In case you missed it, both Justin Tadlock and Nathan Rice have been working hard at posting tutorials for theme authors to use to get their themes updated.  Justin Tadlock recently wrote a great post about the new page menu function in WordPress 2.7 and explains how to save some time when coding the wp_list_pages() function.   Here is the code Justin recommends:

<?php wp_page_menu('show_home=Home&menu_class=page-nav'); ?>

Gone are the days when you have to manually code a home button, which is now done automatically with this code.    This code will also wrap the menu in a page-nav div class, making styling your menu easy.

Justin also explains how to change the output from a child theme or plugin and how to make the page menu of your theme backwards compatible so theme designers can release themes which will be compatible with both WordPress 2.7+ and earlier versions, so I recommend you check it out!

At the same time, Nathan Rice has published the Definitive Guide to Sticky Posts in WordPress 2.7.  This is good information to have, as WordPress 2.7 will include a new “sticky post” feature, meaning you won’t need to use a plugin (or edit the timestamp) to easily feature posts at the top of your WordPress blog.

Great work Justin and Nathan!

Related posts:

  1. Feature Posts with the WP-Sticky WordPress Plugin
  2. How To: Tell WordPress To Function Like a CMS
  3. Making Better Use of Your Error “404″ Page
  4. WordPress Talk - June 15, 2008


You are reading New Page Menu Function & Sticky Posts in WordPress 2.7 © 2008 | WordPress Hacks | WordPress Forums | WordPress eBook | Premium Themes.

Enjoy writing about WordPress? Get your blog more exposure by joining the WordPress Hacks writing team!

Post a Comment
Related Posts Plugin for WordPress, Blogger...

Popular Posts