WordPress的自定义文章类型导航+儿童
问题描述:
更新日期:2010年5月8日WordPress的自定义文章类型导航+儿童
的WordPress现在又增加一个额外的技术,如果该类型后设置为分级从自定义后类型显示的项目。
我想要做的是让它在导航中选中时使用.current_page_item类。
有谁知道一个函数来实现这个?
<?php
$args = array(
'post_type'=>'testimonials',
'title_li'=> __('Testimonials')
);
wp_list_pages($args);
?>
感谢, 乔治
答
与 “自定义后类型的UI” 插件,设置分级=真。
register_post_type('Portfolios', array('label' => 'Portfolios','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post',**'hierarchical' => true**,'rewrite' => array('slug' => ''),'query_var' => true,'supports' => array('title','editor','custom-fields','revisions','thumbnail','page-attributes',),'labels' => array (
'name' => 'Portfolios',
'singular_name' => '',
'menu_name' => 'Portfolios',
'add_new' => 'Add Portfolios',
'add_new_item' => 'Add New Portfolios',
'edit' => 'Edit',
'edit_item' => 'Edit Portfolios',
'new_item' => 'New Portfolios',
'view' => 'View Portfolios',
'view_item' => 'View Portfolios',
'search_items' => 'Search Portfolios',
'not_found' => 'No Portfolios Found',
'not_found_in_trash' => 'No Portfolios Found in Trash',
'parent' => 'Parent Portfolios',
),));
愿意支付100美元以获得此固定,将贝宝给第一个提供工作解决方案的人! – 2010-11-25 20:15:22