So after around a week of frustration. I fixed this problem by simply calling: flush_rewrite_rules() after the new post type is added in the plugin. (it is specified by wordpress documentation to use it but for some reason you didn’t)
so in wpmarketplace/libs/install.php
the code for function wpmp_post_types should look like that:
function wpmp_post_types(){
register_post_type("wpmarketplace",array(
'labels' => array(
'name' => __('Marketplace'),
'singular_name' => __('Product'),
'add_new' => __('Add Product'),
'add_new_item' => __('Add New Product'),
'edit_item' => __('Edit Product'),
'new_item' => __('New Product'),
'view_item' => __('View Product'),
'search_items' => __('Search Product'),
'not_found' => __('No product found'),
'not_found_in_trash' => __('No product found in Trash'),
'parent_item_colon' => ''
),
'public' => true,
'publicly_queryable' => true,
'has_archive' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => array('slug'=>'product','with_front'=>false),
'capability_type' => 'post',
'hierarchical' => false,
'menu_icon' =>plugins_url().'/wpmarketplace/images/wpmp.png',
'supports' => array('title','editor','author','excerpt','thumbnail','ptype','comments','custom-fields') ,
'taxonomies' => array('ptype')
)
);
flush_rewrite_rules();
}