Last active
February 3, 2021 17:37
-
-
Save wpmu-authors/7c656623608efd1785437ebe7cdb7350 to your computer and use it in GitHub Desktop.
incorrect-cpt.php
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
register_activation_hook( __FILE__, 'my_plugin_activation' ); | |
function my_plugin_activation() { | |
flush_rewrite_rules(); | |
} | |
add_action( 'init', 'my_custom_post_type' ); | |
function my_custom_post_type() { | |
$args = array( | |
'public' => true, | |
'label' => 'Board Games' | |
); | |
register_post_type( 'boardgames', $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment