function slides() {
register_post_type( 'slides',
array(
'labels' => array(
'name' => __( 'Slides' ),
'singular_name' => __( 'Slide' )
),
'public' => false,
'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,
'has_archive' => false,
'query_var' => "portfolio",
'menu_position' => 20,
'supports' => array('title', 'excerpt', 'editor', 'thumbnail',),
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes' ),
'taxonomies' => array( 'category', 'post_tag', 'page-category' ),
)
);
}
add_action( 'init', 'slides' );
function load_scripts() {
// jquery cycle
wp_register_script( 'jquery.cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', array('jquery'));
wp_enqueue_script( 'jquery.cycle' );
// jquery code for site
wp_register_script( 'site', get_template_directory_uri() . '/js/site.js');
wp_enqueue_script( 'site' );
} custom post
2
●304
- 07-03-2014, 20:30:43Kimlik doğrulama veya yönetimden onay bekliyor.meraba arkadaşlar ben aşağıdaki kodlarla siteme custom post özelliği ekledim ve bir kaç php kodu ile bu custom olarak eklenen postları anasayfamda gösterebiliyorum. lakin bu postlara tıklayınca ayrı bir yazı sayfası açılsın farklı bir yazısayfası oluşsun istiyorum bunu hangi kodları ekleyerek yapabilirim ?
- 08-03-2014, 15:56:08peki function.php ye hangi kodları eklemem gerek?SrCn adlı üyeden alıntı: mesajı görüntüle