add condition logic
-
Hi,
This is my code
class Custom_Post_Type
{
public function __construct()
{
$this->register_post_type();
}
public function register_post_type()
{
$args = array(
‘labels’ =>array(
‘name’ =>’Products’,
‘Singular_name’ => ‘Product’,
‘add_new’=>’Add new Product’,
‘add_new_item’=>’add new Product’,
‘edit_item’=>’Edit Item’,
‘new_item’=>’Add New Item’,
‘view_item’=>’View Product’,
‘search_items’=>’search Products’,
‘not_found’=>’No Products Found’,
‘not_found_in_trash’=>’No Products Found in Trash’,
),
‘query_var’=>’Products’,
‘rewrite ‘=>array(
‘slug’=>’Products/’,
),
‘public ‘=>true
);
register_post_type(‘Product’,$args);
}
}
add_action(‘init’,function()
{
new Custom_post_type();
});I’want to add if condition to this post..
Any Help will be appreciatedThanks Regards
Prakash
The topic ‘add condition logic’ is closed to new replies.