Last active
January 21, 2020 15:41
-
-
Save salcode/a8ef2590747988b54f0d154cc3fdb958 to your computer and use it in GitHub Desktop.
Minimal WordPress code to register the Custom Post Type `fe_recipe`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register CPT `fe_recipe` | |
*/ | |
add_action( 'init', 'fe_recipe_cpt' ); | |
/** | |
* Register CPT `fe_recipe` | |
*/ | |
function fe_recipe_cpt() { | |
register_post_type( 'fe_recipe', array( | |
'label' => 'Recipes', | |
'public' => true, | |
'has_archive' => true, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment