I want to add a new post type
i have a php file (posttype.php) at : wordpress/wp-content/themes/
this is the code :
<?php
// Add new post type for Recipes
add_action('init', 'cooking_recipes_init');
function cooking_recipes_init()
{
$args = array(
'label' => _x('Recipes'),
'singular_label' => _x('Recipe'),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor','comments')
);
register_post_type('recipes',$args);
}
?>
i have a problem at the top of the page (but the posttype is created suc) :
Warning: Missing argument 2 for _x(), called in D:\xampp\htdocs\wordpress\wp-content\themes\posttypes.php on line 12 and defined in D:\xampp\htdocs\wordpress\wp-includes\l10n.php on line 189
Warning: Missing argument 2 for _x(), called in D:\xampp\htdocs\wordpress\wp-content\themes\posttypes.php on line 14 and defined in D:\xampp\htdocs\wordpress\wp-includes\l10n.php on line 189
Thank you .