The other day I searched for a snippet to remove the post meta from custom post types using Genesis and I found this article from Transmit Studio. The snippet they give works perfectly but it checks only one post type at a time. To use it with multiple post types, you’d need to adjust the code. In my case, I wanted to disable the post meta for ALL of my custom post types. Also, they included a line to remove the title of the post and I didn’t want this. Therefore, my modified code looks like this:
Rather than checking against one specific post type, this checks to make sure that the post type is not a “Post” (i.e. a blog post). If true, the custom post type meta is disabled. If the post type is a “Post”, the meta remains.
EJIGA GODWIN JNR says
Hello can you tip me on how to disable post meta info ( Categories and Tags) on homepage and single post of genesis eleven pro theme. which is based on Genesis frame work.
Ren says
Sure. You can use the two
remove_action()
functions from that code. If needed, you can use other conditionals for further control.Jeff Sauer says
Saved my day today. Thanks for writing this article!
Ren says
Awesome!
Jim Proctor says
I implemented your code snippet (and tried others) in my Genesis child theme functions.php, and the postmeta remain…see e.g. here. Could this possibly be due to the Toolset CPT plugin I run? Some weird Genesis Design Palette Pro interference? Would appreciate any clues in tracking down the problem, as your code is exactly what I need on this site, which has a variety of CPTs.
Thanks,
Jim
Ren says
Hi, Jim. Can you deactivate the other plugins to test if the problem persists?
Jim Proctor says
This is on a multisite we run with a gillion network-enabled and other site-enabled plugins…even if I could deactivate them all, it may not help me work toward a solution as they’re all needed. Can you think of any other possibilities to diagnose the problem? (And I’m assuming I’m correct in placing the code in the Executive Pro child theme, yes?)
Many thanks,
Jim P.
Ren says
The only way to really rule out a plugin conflict is to deactivate the plugins that may be causing the conflict and, if the issue is resolved, reactivate them one at a time to see which one is causing the problem. If a plugin you’re using is preventing this snippet from working and that plugin is essential to the site, you could contact the plugin author to ask why this is happening. It may be that one of the plugins is adding a custom function for displaying the meta and, thus, making the code in this snippet non-functional. It’s hard to tell exactly if a plugin is doing something like this and which one it is without disabling them.
To answer your last question: as long as Executive Pro is the active theme, then yes.
Jim Proctor says
Okay, many thanks…Jim P.
Dave says
Ren,
Very nice! Because who needs those bloggish bits on a Custom Post Type? Pretty much no one. 🙂
Thanks, Dave
Ren says
Hey, Dave! I completely agree. Thanks for commenting. 🙂
Dave Kuhar says
Hey Ren, thanks for linking back to us. I like your tweak, it could come in handy!
Ren says
Hi, Dave. My pleasure! Thanks for making the code available.