Title: Modify code to create gallery
Last modified: March 30, 2022

---

# Modify code to create gallery

 *  Resolved [dacaicer](https://wordpress.org/support/users/dacaicer/)
 * (@dacaicer)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/modify-code-to-create-gallery/)
 * Hi help please
    What should I change or add in the code so that the image or 
   video of the nft remains as a featured image automatically, in order to create
   a gallery of multiple collections Thank you.
 * `// Create NFTs CPT
    public function initialize() {
 *  $labels = array(
    ‘name’ => _x( ‘NFT’, ‘post type general name’, ‘wp-smart-contracts’),‘
   singular_name’ => _x( ‘NFT’, ‘post type singular name’, ‘wp-smart-contracts’ ),‘
   menu_name’ => _x( ‘NFT’, ‘admin menu’, ‘wp-smart-contracts’ ), ‘name_admin_bar’
   => _x( ‘NFT’, ‘add new on admin bar’, ‘wp-smart-contracts’ ), ‘add_new’ => _x(‘
   Add New NFT’, ‘NFT’, ‘wp-smart-contracts’ ), ‘add_new_item’ => __( ‘Add New NFT’,‘
   wp-smart-contracts’ ), ‘new_item’ => __( ‘New NFT’, ‘wp-smart-contracts’ ), ‘
   edit_item’ => __( ‘Edit NFT’, ‘wp-smart-contracts’ ), ‘view_item’ => __( ‘View
   NFT’, ‘wp-smart-contracts’ ), ‘all_items’ => __( ‘All NFT’, ‘wp-smart-contracts’),‘
   search_items’ => __( ‘Search NFT’, ‘wp-smart-contracts’ ), ‘parent_item_colon’
   => __( ‘Parent NFT:’, ‘wp-smart-contracts’ ), ‘not_found’ => __( ‘No NFT found.’,‘
   wp-smart-contracts’ ), ‘not_found_in_trash’ => __( ‘No NFT found in Trash.’, ‘
   wp-smart-contracts’ ) );
 *  $args = array(
    ‘labels’ => $labels, ‘description’ => __( ‘Description.’, ‘wp-
   smart-contracts’ ), ‘public’ => true, ‘publicly_queryable’ => true, ‘show_ui’
   => true, // this removes UI from wp-admin ‘show_in_menu’ => true, ‘menu_icon’
   => plugin_dir_url( dirname( __FILE__ ) ) . ‘assets/img/icon-nft.png’, ‘query_var’
   => true, ‘rewrite’ => array( ‘slug’ => ‘nft’ ), ‘capability_type’ => ‘page’, ‘
   has_archive’ => true, ‘hierarchical’ => false, ‘menu_position’ => null, ‘supports’
   => array( ‘title’, ‘editor’, ‘thumbnail’ ) );

Viewing 1 replies (of 1 total)

 *  Plugin Author [Lisandro Martinez](https://wordpress.org/support/users/wpsmartcontracts/)
 * (@wpsmartcontracts)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/modify-code-to-create-gallery/#post-15515211)
 * Sorry, this is out of scope of support

Viewing 1 replies (of 1 total)

The topic ‘Modify code to create gallery’ is closed to new replies.

 * ![](https://ps.w.org/wp-smart-contracts/assets/icon-256x256.png?rev=2931594)
 * [WPSmartContracts](https://wordpress.org/plugins/wp-smart-contracts/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smart-contracts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smart-contracts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smart-contracts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smart-contracts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lisandro Martinez](https://wordpress.org/support/users/wpsmartcontracts/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/modify-code-to-create-gallery/#post-15515211)
 * Status: resolved