-
Author
-
November 1, 2015 at 09:35 #85307andrearuffiniParticipant
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>
November 1, 2015 at 19:36 #85354LauraModeratorHello, 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 solutionLaura 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 🙂
November 5, 2015 at 18:00 #85738RaduModeratorHi,
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 solutionNovember 9, 2015 at 18:04 #86415RaduModeratorYou’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 -
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.