By Neil on May 28, 2014
Custom Post Types can make creating and categorising content on your website much easier. Along with this tools such as those provided by the Genesis Framework mean we can configure SEO parameters quickly and easily. The Genesis Framework adds Theme SEO Settings to each post and page you create on your WordPress website, where you can set optimised titles, meta descriptions and more. However, if you create custom post types these additional SEO fields do not show up when you create a new custom post.
This is a problem easily solved, and with the addition of one line of code in to your functions.php file these super useful SEO settings will show up on every custom post type you have. Watch the video below to see how easy this is. There is also a description of this below.
Step-by-step tutorial to add Genesis SEO settings to custom posts
This tutorial only applies to those with the Genesis Framework. Read more about this here.
When you create a custom post type make note of its slug. You will have set this during the configuration of your custom post type, however you can see it by looking at the URL of a custom post.
Open up the editor for the functions.php file. This is found in your WordPress dashboard under Appearance/Editor. Click the file name for the functions.php file on the right-hand-side.
Scroll to the bottom of your functions.php file and add the following code:
//* Add Genesis SEO options to custom posts
add_post_type_support( ‘custom-post-type-slug’, ‘genesis-seo’ );
The //* comments out this top line because it is just for reference. Replace custom-post-type-slug with your slug. You can copy this line of code several times if you have several custom post types on your website.
Update this file and you are done. Open up a custom post and you should see the Genesis Theme SEO Settings areas showing up.