When working with custom post types in a Genesis powered WordPress site, you’ll often want to enable some extra features for the post type. The default situation is that while you’re post type may be up and running it will not have support for things like the Genesis SEO controls, Genesis Layouts or custom scripts.
I have to Google this over and over so here for me (and you!) is the list of items that you can define.
If you have defined your custom post type manually in your functions file then adding the feature using the add_post_type_support() function should work for you. Add these in your functions.php to get the job done. Of course if you’ve defined it manually then you may just add it in the supports section of the custom post types registration. I’ll leave that for you to work out 🙂
The first argument is the name of the post type and the second will enable the Genesis feature, in the first example the scripts box that allows you to add specific scripts to the <head> of this document.
// Add support for the Genesis Scripts meta box on a custom post type add_post_type_support( 'recipes', 'genesis-scripts' );
add_post_type_support( 'your_custom_post_type', 'genesis-layouts' );
Genesis SEO settings
add_post_type_support( 'your_custom_post_type', 'genesis-seo' );
If you use a plugin like Custom Post Type UI then you’re in luck as it allows you to setup “Custom Supports”. Instead of placing the code into your functions.php file (although that will still work) you can just tell the plugin to add special support for these items.
You only need to enter the item(s) that you’d like to support: