资 源 简 介
Attempt to use the wordpress P2 Theme as a Page Template with a Custom Post Type
This is a work in progress. You can see it working at http://www.humbug.in/mblog/ (its NOT a demo page).
Check out the source code using the below command into your theme directory
cd THEME_DIRECTORYsvn checkout http://p2-theme-page-template.googlecode.com/svn/trunk/ p2
Add `require_once( BIRDBRAIN_DIR . "/p2/p2-bridge.php" );` at the bottom of your theme"s function.php
Open up the p2-bridge.php file and edit the following variables according to your blog settings
$p2_custom_post_type = "aside"; //Custom Post Type Identifier$p2_custom_post_type_name = "Asides"; //Custom Post Type Plural Name$p2_custom_post_type_singular_name = "Aside"; //Custom Post Type Singular Name$p2_custom_post_type_page_slug = "mblog"; //Page Slug where you want to display the P2 Blog
p2-blog.php