• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Services
    • WordPress Websites
    • Digital Marketing
    • Managed Hosting
  • Portfolio
  • Blog
  • Contact

The Digital Marketing Agency

The Australian WordPress Experts

You are here: Home / WordPress Tech / Custom post types and the Genesis framework
Custom post types and the Genesis framework

May 29, 2019 by Peter Shilling Leave a Comment

Custom post types and the Genesis framework

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 your post type may be up and running it will not have support for things like the Genesis SEO controls, Genesis Layouts or custom scripts.

It should not matter how the post types have been registered. 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 🙂

If you use the plugin Custom Post Type UI view the special instruction for that plugin at the bottom of this article.

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.

Genesis Scripts

This will enable the Genesis script meta box for the post type, this can then be used to insert javascript into a specific page.

// Add support for the Genesis Scripts meta box on a custom post type
add_post_type_support( 'your_custom_post_type', 'genesis-scripts' );

Genesis SEO Settings

This one is to enable the SEO settings for your post type.

add_post_type_support( 'your_custom_post_type', 'genesis-seo' );

Genesis Layouts

Need to control the layout for post type? This final one is for you!

add_post_type_support( 'your_custom_post_type', 'genesis-layouts' );

If you use the popular plugin Custom Post Type UI then setting these things up for your custom post type is even quicker. Look for the Custom Supports section when configuring your post type and enter the values there.

  • genesis-seo
  • genesis-layouts
  • genesis-scripts

Interested in more WordPress Tech articles, check them out here .

Filed Under: WordPress Tech Tagged With: Genesis, WordPress Code

About Peter Shilling

Peter is a co-founder at The DMA. Specialising in WordPress development since 2008, he's been involved in projects big and small around Australia. Read his full profile here

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Looking for Australia’s premier WordPress agency?

Say hello

Our Blog, by topic

  • Client Projects (6)
  • Content Marketing (10)
  • Digital Marketing (71)
  • Notices (6)
  • Opinion (3)
  • Search Engine Optimisation for WordPress (16)
  • Social Media (2)
  • WordPress (49)
  • WordPress LMS (1)
  • WordPress Performance (5)
  • WordPress Tech (3)
  • WordPress Training (3)

You may also like

Gravity Forms restricting days in the date picker
WooCommerce: how to restrict purchasing based on WordPress role

Footer

Don’t be shy :)

We'd love to hear about your project

Need a new WordPress site?

Perhaps a rebuild of an existing website, or you might be looking for a team of WordPress professionals to consult on your project.

Say Hello

Get in Touch

E: [email protected]dma.com.au
P: 1300 871 470

PO Box 109
Mona Vale NSW 1660

Quick Links

  • Join Our Team
  • Read Our Blog
  • Plugins
  • Privacy
  • Sitemap

© Copyright 2008-2021 · All Rights Reserved · The Digital Marketing Agency PTY LTD.