This topic has 5 replies, 3 voices, and was last updated 9 years by Radu.

  • Author
  • #85307
     andrearuffini
    Participant

    Hi,

    I created a CPT in a plugin but when I try to visualize it in the front end I get a white page. What’s wrong?

    The following is the code I used to create the CPT:

    <code>

    function richieste() {

    $labels = array(

    ‘name’                => _x( ‘Richieste’, ‘Post Type General Name’, ‘gpro’ ),

    ‘singular_name’       => _x( ‘Richiesta’, ‘Post Type Singular Name’, ‘gpro’ ),

    ‘menu_name’           => __( ‘Richieste’, ‘gpro’ ),

    ‘name_admin_bar’      => __( ‘Richieste’, ‘gpro’ ),

    ‘parent_item_colon’   => __( ‘Richiesta padre:’, ‘gpro’ ),

    ‘all_items’           => __( ‘Tutte le richieste’, ‘gpro’ ),

    ‘add_new_item’        => __( ‘Aggiungi nuova richiesta’, ‘gpro’ ),

    ‘add_new’             => __( ‘Aggiungi nuova’, ‘gpro’ ),

    ‘new_item’            => __( ‘Nuova richiesta’, ‘gpro’ ),

    ‘edit_item’           => __( ‘Modifica richiesta’, ‘gpro’ ),

    ‘update_item’         => __( ‘Aggiorna richiesta’, ‘gpro’ ),

    ‘view_item’           => __( ‘Visualizza richiesta’, ‘gpro’ ),

    ‘search_items’        => __( ‘Cerca richiesta’, ‘gpro’ ),

    ‘not_found’           => __( ‘Non trovata’, ‘gpro’ ),

    ‘not_found_in_trash’  => __( ‘Non trovata nel cestino’, ‘gpro’ ),

    );

    $args = array(

    ‘label’               => __( ‘Richiesta’, ‘gpro’ ),

    ‘description’         => __( ‘Queste sono le richieste che i clienti possono fare ai consulenti g-pro’, ‘gpro’ ),

    ‘labels’              => $labels,

    ‘supports’            => array( ‘title’, ‘editor’, ‘excerpt’, ‘author’, ‘thumbnail’, ‘comments’, ‘revisions’, ‘custom-fields’, ‘page-attributes’, ),

    ‘taxonomies’          => array( ‘category’, ‘post_tag’ ),

    ‘hierarchical’        => false,

    ‘public’              => true,

    ‘show_ui’             => true,

    ‘show_in_menu’        => true,

    ‘menu_position’       => 5,

    ‘menu_icon’           => ‘dashicons-testimonial’,

    ‘show_in_admin_bar’   => true,

    ‘show_in_nav_menus’   => true,

    ‘can_export’          => true,

    ‘has_archive’         => true,

    ‘exclude_from_search’ => false,

    ‘publicly_queryable’  => true,

    ‘capability_type’     => ‘post’,

    );

    register_post_type( ‘richieste’, $args );

    }

    add_action( ‘init’, ‘richieste’, 0 );

    </code>

     

    #85354
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #85684
     andrearuffini
    Participant
    This reply has been set as private.
    #85738
     Radu
    Moderator

    Hi,

    Just go to wp-admin -> settings -> permalinks -> save changes.

    That’s all

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #86255
     andrearuffini
    Participant

    Hi Radu,

    thank you. It works!

    Andrea

    #86415
     Radu
    Moderator

    You’re welcome,

    Also don’t forget to rate our theme on Themeforest and give it 5 stars 🙂

    http://themeforest.net/downloads/

    Best regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?