Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

d0cpaul on "Canvas Theme Custom Post Types"

$
0
0

So I've been searching and reading through the support forums for hours to resolve this so I thought I would finally ask. How do I customize a CTP template in the WooThemes Canvas theme? I created my own custom post type called, "disneyland". I duplicated content.php and archive.php and renamed it to content-disneyland.php and archive-disneyland.php and tried customizing content-disneyland but none of my changes reflect the CTP at all. What am I doing wrong?

Here is the code I used to register the CTP in functions.php:

// Register Custom Post Type

function custom_post_type() {

$labels = array(
'name' => _x( 'Disneyland', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Disneyland', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Disneyland', 'text_domain' ),
'parent_item_colon' => __( 'Parent Information:', 'text_domain' ),
'all_items' => __( 'All Disneyland Info', 'text_domain' ),
'view_item' => __( 'View Disneyland Info', 'text_domain' ),
'add_new_item' => __( 'Add New Info', 'text_domain' ),
'add_new' => __( 'Add New Info', 'text_domain' ),
'edit_item' => __( 'Edit Disneyland Info', 'text_domain' ),
'update_item' => __( 'Update information', 'text_domain' ),
'search_items' => __( 'Search products', 'text_domain' ),
'not_found' => __( 'No Disneyland Information Found', 'text_domain' ),
'not_found_in_trash' => __( 'No Disneyland Information found in Trash', 'text_domain' ),
);
$rewrite = array(
'slug' => 'disneyland',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'disneyland', 'text_domain' ),
'description' => __( 'Disneyland Key Information', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => '/Disneyland-Custom-Post-Type-Menu-Icon.png',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'products', $args );

}

// Hook into the 'init' action
add_action( 'init', 'custom_post_type', 0 );

}

[Please always use the code buttons when posting code]

If you know of a good tutorial or know what the problem is please help!


Viewing all articles
Browse latest Browse all 8245

Trending Articles