function post_type_portfolio() {
register_post_type( 'Portfolio', array(
'label' => __('Portfolio'),
'public' => true,
'show_ui' => true,
'_builtin' => false, // It's a custom post type, not built in
'_edit_link' => 'post.php?post=%d',
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array("slug" => "portfolio"), // Permalinks
'query_var' => "portfolio",
'menu_position' => 20,
'supports' => array('title', 'excerpt', 'editor', 'thumbnail',),
'labels' => $labels,
'hierarchical' => true,
'description' => 'Hi, this is my custom post type.',
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes' ),
'taxonomies' => array( 'category', 'post_tag', 'page-category' ),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_icon' => 'http://www.google.com',
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'has_archive' => true,
'query_var' => true,
'can_export' => true,
'rewrite' => true,
'capability_type' => 'post'
));
// add the following function if you are getting
// a 'Page not found' error from your permalink
flush_rewrite_rules( false );
}
register_taxonomy( "Project Type", array("Portfolio"), array(
"hierarchical" => true,
"label" => "Project Types",
"singular_label" => "Project Type",
"rewrite" => true
));ayrı bir custom yazı ekleme sekmesi oluşturdum ve bu özelliği anasayfama yerleştirdim eklediğim yazılar çok güzel çıkıyor hiç bir sorun yok ama arama sonuçlarında bu eklediğim yazıların çıkmasını istemiyorum bunu hangi kodlarla yapabilirim ve arama sonuçlarında ayrıyetten eklediğim bu postlar iki tane çıkıyor.
ayrı bir custom post ekleme özelliği oluşturdum fakat..
0
●197
- 18-02-2014, 16:29:31Kimlik doğrulama veya yönetimden onay bekliyor.arkadaşlar şu kodları kullanarak