• 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 appreciated

    Thanks Regards
    Prakash

Viewing 1 replies (of 1 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’want to add if condition to this post..
    Any Help will be appreciated

    What do you mean by that?

Viewing 1 replies (of 1 total)

The topic ‘add condition logic’ is closed to new replies.