Skip to content

Instantly share code, notes, and snippets.

@Sstobo
Created November 14, 2017 21:23
Show Gist options
  • Save Sstobo/fe410434fb3de1b233800367695cab8e to your computer and use it in GitHub Desktop.
Save Sstobo/fe410434fb3de1b233800367695cab8e to your computer and use it in GitHub Desktop.
[WP Plugin dev] #wp #plugins
function inhabitent_cpt_product() {
$args = array();
register_post_type( 'product', $args );
}
add_action( 'init', 'inhabitent_cpt_product' );
## FLUSH PERMALINK CACHE When adding new content type or templates OR HAVING PROBLEMS ##
go to settings on dash
permalinks ---> save
use Generate Wordpress Post Type
Generate post type / taxonomy
Copy into post-types.php and taxonomies.php in plugin boiler plate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment