custom post type with role Vendor

First you have to passed two additional arguments into the register_post_type() function. capability_type map_meta_cap Then, You can add capability using add_cap(); function. register_post_type( ‘acme_product’, array( ‘labels’ => array( ‘name’ => __( ‘Products’ ), ‘singular_name’ => __( ‘Product’ ) ), ‘public’ => true, ‘has_archive’ => true, ‘capability_type’ => array(‘acme_product’,’acme_products’), ‘map_meta_cap’ => true, ) ); add_action(‘admin_init’,’vendor_role_caps’); function … Read more

Open tab on current day problem jQuery and WordPress

Your problem is one of formatting: <?php add_action( ‘wp_footer’, ‘wpse203799_footerscript’, ’30’ ); }?> There’s a very good reason that programmers follow coding standards, and use editors that automatically format and indent code. If we do these to the code used here, we’ll see this: <?php add_action( ‘wp_footer’, ‘wpse203799_footerscript’, ’30’ ); } ?> This means that … Read more

I want to generate the pdf and save it in library?

Saving in WordPress library can be done by using this function media_handle_upload. PDF can be created in many ways. The best method depends on your runtime enviroment and the functionality you are looking for. There are several PDF generating libs for PHP out there, for example PDFlib. But again your question is far broad.