• Resolved dacaicer

    (@dacaicer)


    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)
Viewing 1 replies (of 1 total)
  • The topic ‘Modify code to create gallery’ is closed to new replies.