Problem on create plugin (1 post)

  1. serviceweb
    Posted 1 year ago #

    Hello everyone!

    I try to create a plugin and i need a create a custom post type. I try to add this code on my file.php `<?php
    Plugin Name: Name My
    Plugin URI: http://www.mysite.it
    Description: Secret
    Author: My
    Version: Numero di versione (es. 1.0)
    Author URI: http://www.mysite.it

    add_action ( 'init' , 'create_gestione_clienti' );

    function create_movie_review() {
    register_post_type( 'gestione_clienti',
    'labels' => array(
    'name' => 'Gestione Clienti',
    'singular_name' => 'Movie Review',
    'add_new' => 'Add New',
    'add_new_item' => 'Add New Movie Review',
    'edit' => 'Edit',
    'edit_item' => 'Edit Movie Review',
    'new_item' => 'New Movie Review',
    'view' => 'View',
    'view_item' => 'View Movie Review',
    'search_items' => 'Search Movie Reviews',
    'not_found' => 'No Movie Reviews found',
    'not_found_in_trash' => 'No Movie Reviews found in Trash',
    'parent' => 'Parent Movie Review'

    'public' => true,
    'menu_position' => 5,
    'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'custom-fields' ),
    'taxonomies' => array( '' ),
    'menu_icon' => plugins_url( 'images/image.png', __FILE__ ),
    'has_archive' => true


    But i have this error Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'create_gestione_clienti' not found or invalid function name in C:\xampp\htdocs\test\wp-includes\plugin.php on line 429

    Why? Where i wrong? Thanks much. Have a nice day :)

Topic Closed

This topic has been closed to new replies.

About this Topic