wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Register taxonomy for your pages

wordpress snippet

This is a simple snippet that will register a custom taxonomy for pages. In the sample code I register a taxonomy called things but of course you would want to register something a little more realistic. You can find out more details about registering a custom taxonomy in the codex. Just add this snippet to the functions.php of your wordpress theme and you will see the new taxonomy displayed within the wordpress admin.

read more

Display taxonomy terms in an unordered list

wordpress snippet

Adding this snippet to your wordpress theme will list the custom taxonomies that you registered for a custom post type.

read more

Add tag selection to custom post type

wordpress snippet

Adding this wordpress snippet to the functions.php will enable tag selection within the editor for that custom post type. Don’t forget to change the CUSTOM_POST_TYPE to the name of the custom post type you created.

read more

Add category selection to custom post type

wordpress snippet

Adding this wordpress snippet to the functions.php will enable category selection within the editor for your custom post type. Don’t forget to change the CUSTOM_POST_TYPE to the name of the custom post type you created.

read more