wordpress 二次开发全能教程
1. 根据分类来制定导航条
A. 修改页面 header.php!
B. 修改 style.css,增加下面一行语句
#main-nav li.cat-item{
margin-right: 2.2em;
float: left;
}
2. 删除控制面板首页多余的板块
A. 删除开发日志面板,在 wp-admin\includes\dashboard.php 注释掉下面几句代码。
// Primary feed (Dev Blog) Widget
if ( !isset( $widget_options['dashboard_primary'] ) ) {
$update = true;
$widget_options['dashboard_primary'] = array(
'link' => apply_filters( 'dashboard_primary_link',
__( '/development/' ) ),
'url' => apply_filters( 'dashboard_primary_feed',
__( '/development/feed/' ) ),
'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress
Development Blog' ) ),
'items' => 2,
'show_summary' => 1,
'show_author' => 0,
'show_date' => 1
);
}
wp_add_dashboard_widget( 'dashboard_primary',
$widget_options['dashboard_primary']['title'], 'wp_dashboard_primary',
'wp_dashboard_primary_control' );
B. 删除相关新闻,在 wp-admin\includes\dashboard.php 注释掉下面几句代码。
if ( !isset( $widget_options['dashboard_secondary'] ) ) {
$update = true;
$widget_options['dashboard_secondary'] = array(
'link' => apply_filters( 'dashboard_secondary_link',
__( '/' ) ),
'url' => apply_filters( 'dashboard_secondary_feed',
__( '/feed/' ) ),
'title' => apply_filters( 'dashboard_secondary_title', __( 'Other
WordPress News' ) ),
'items' => 5
);
}
wp_add_dashboard_widget(