• Hello,

    I would like to dublicate or copy “Game Reviews” and give it an other name. So I have “Game Reviews”, “Videos” and “Film Reviews.
    How can I manage this? I have already edited functions.php and added this under “Create custom post types”:

    add_action( 'init', 'gamepress_register_filmbesprechungen_post_type' );
    
    function gamepress_register_filmbesprechungen_post_type() {
    	// Filmbesprechung
    	register_post_type( 'gamepress_filmbesprechung',
    		array(
    			'labels' => array(
    				'name' => __( 'Filmbesprechungen','gamepress' ),
    				'singular_name' => __( 'Filmbesprechung','gamepress' ),
    				'add_new' => __( 'Add New','gamepress' ),
    				'add_new_item' => __( 'Add New Filmbesprechung','gamepress' ),
    				'edit' => __( 'Edit','gamepress' ),
    				'edit_item' => __( 'Edit Filmbesprechung','gamepress' ),
    				'new_item' => __( 'New Filmbesprechung','gamepress' ),
    				'view' => __( 'View Filmbesprechung','gamepress' ),
    				'view_item' => __( 'View Filmbesprechung','gamepress' ),
    				'search_items' => __( 'Search Filmbesprechung','gamepress' ),
    				'not_found' => __( 'No Filmbesprechungen found','gamepress' ),
    				'not_found_in_trash' => __( 'No Filmbesprechungen found in Trash','gamepress' ),
    				'parent' => __( 'Parent Filmbesprechung','gamepress' ),
    			),
                'public' => true,
    			'publicly_queryable' => true,
    			'show_in_nav_menus' => true,
    			'show_ui' => true,
    			'exclude_from_search' => false,
    			'hierarchical' => false,
                'menu_position' => 22,
    			'has_archive' => true,
                'rewrite' => array('slug' => 'filmbesprechung'),
                'supports' => array('title','editor','author','thumbnail','excerpt','comments'),
                'taxonomies' => array('post_tag'),
                'yarpp_support' => true
            )
        ); 
    
    }

    I added also this under “Register custom taxonomies”:

    add_action( 'init', 'gamepress_create_filmbesprechung_category', 0 );
    
    function gamepress_create_filmbesprechung_category()
    {
    
      $labels = array(
        'name' => _x( 'Filmbesprechung Categories', 'taxonomy general name','gamepress' ),
        'singular_name' => _x( 'Filmbesprechung Category', 'taxonomy singular name','gamepress' ),
        'search_items' =>  __( 'Search Filmbesprechung Categories','gamepress'),
        'all_items' => __( 'All Filmbesprechung Categories','gamepress' ),
        'parent_item' => __( 'Parent Filmbesprechung Category','gamepress' ),
        'parent_item_colon' => __( 'Parent Filmbesprechung Category:', 'gamepress' ),
        'edit_item' => __( 'Edit Filmbesprechung Category','gamepress' ),
        'update_item' => __( 'Update Filmbesprechung Category','gamepress' ),
        'add_new_item' => __( 'Add New Filmbesprechung Category','gamepress' ),
        'new_item_name' => __( 'New Filmbesprechung Category Name','gamepress' ),
        'menu_name' => __( 'Categories','gamepress' ),
      ); 	
    
      register_taxonomy('gamepress_filmbesprechung_category',array('gamepress_filmbesprechung'), array(
    	'public' => true,
    	'show_in_nav_menus' => true,
        'hierarchical' => true,
        'labels' => $labels,
        'show_ui' => true,
        'query_var' => true,
      ));

    And I have duplicated the following phps and changed/renamed everywhere reviews to filmbesprechung:

    – archive-gamepress_reviews.php
    – single-gamepress_reviews.php
    – reviews-single.php

    But I can’t see this new section filmbesprechung in admin pannel. Can you help me please?

  • The topic ‘Dublicate "Game Reviews" section’ is closed to new replies.