ΪWordPressÖ÷ÌâÖÆ×÷ÏÂÀ²Ëµ¥Ïê½â
ÖÚËùÖÜÖª£¬WordPress3.0ÖÐÔö¼ÓÁËÒ»¸ö·Ç³£ÊµÓ÷½±ãµÄ×Ô¶¨Òå²Ëµ¥¹¦ÄÜ£¬Õâ¸ö¹¦ÄÜ¿ÉÒÔʹÎÒÃÇÇáËɵÄÖÆ×÷³ö¶à¼¶ÏÂÀ²Ëµ¥£¬½ñÌ죬±ÊÕß¾Íͨ¹ýÒ»¸ö¼òµ¥µÄ¶þ¼¶ÏÂÀ²Ëµ¥µÄʾÀýÀ´¸æË߸÷λͯЬ¾ßÌåÔõô²Ù×÷¡£
Step 1 — ÔÚfunctions.phpÖÐÌí¼ÓÒÔÏ´úÂ룬ʹÎÒÃǵÄÖ÷ÌâÖ§³Ö×Ô¶¨Òå²Ëµ¥¹¦ÄÜ¡£
add_theme_support£¨‘nav-menus’£©;
Step 2 — Ìí¼ÓÒ»¸ö¶¥²¿²Ëµ¥¡£
if £¨ function_exists£¨ ‘register_nav_menus’ £© £© {
register_nav_menus£¨
array£¨
‘header_menu’ => ‘Header Navigation’
£©
£©;
}
Step 3 — °Ñwp_nav_menu()º¯Êý·Åµ½Ò»¸ö×Ô¶¨Ò庯Êýµ±ÖÐ.
function wper_so_menu£¨£©{
if£¨function_exists£¨‘wp_nav_menu’£© && has_nav_menu£¨‘header_menu’£©£©£º
wp_nav_menu£¨
array£¨
‘menu’ => ‘Header Navigation’,
‘container’ => ‘div’,
‘container_class’ => ‘warp’,
‘container_id’ => ‘’,
‘menu_class’ => ‘ddsmoothmenu’,
‘menu_id’ => ‘nav’,
‘echo’ => true,
ÍƼöÐÅÏ¢
- ¹¹½¨¸ß¿ÉÓú͵¯ÐÔÉìËõµÄKV´æ´¢ÏµÍ³
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨¶þ£©
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨Ò»£©
- Ðì¹úÏ飺΢²©ÊÇ·ñ»á²ÎÓëÍøÕ¾ÅÅÃû
- ApacheÔÚ±¾µØ½¨Á¢·ºÓòÃûÐéÄâÖ÷»ú¼ò·¨
- ÈçºÎ½øÐÐÍøÕ¾Õï¶Ï ΪÍøÕ¾½øÐÐÆÀ·Ö
- Ò»¸ö³É¹¦µÄÕ¾³¤Ó¦¸Ã¾ß±¸µÄËØÖÊ
- Ò»Ìõ΢²©Òý·¢µÄ·ÖÎö£ºÈçºÎÈÃ΢²©µÃµ½¹ã·º´«²¥
- ÈçºÎÈÃÒ»¸öÍøÕ¾ÓÐÇ¿´óÉúÃüÁ¦
- פ×ãIDCÃż÷³Ö±Ò¹ÛÍû Õ¾³¤Ñ¡¹º¿Õ¼ä³É¡°¼èÄѵľö¶¨¡±£¿
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
ÆÀÂÛ