• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

How to fix Custom Post Class not saving in StudioPress Genesis 1.8

August 23, 2015 by admin Leave a Comment

If you use the StudioPress Genesis Framework for your WordPress site, you may also use the included Custom Post Class option inside the post pages. This option allows you to specify the post class of a specific post or page by simply typing the name of the post class in the provided field inside the post editor screen. With the latest update, StudioPress Genesis 1.8, the Custom Post Class field does not update and save when you save the page. Today’s snack will show you how to fix it so that the Custom Post Class field updates when you hit save.

Just navigate your site’s file manager to this file: wp-content/themes/genesis/lib/admin/inpost-metaboxes.php and enter this code below right before the last closing } bracket:

$genesis_custom_post_class = $_POST['_genesis_custom_post_class'];

/** Save custom post class value, or delete if the value is empty */
if ( $genesis_custom_post_class )
    update_post_meta( $post_id, '_genesis_custom_post_class', $genesis_custom_post_class );
else
    delete_post_meta( $post_id, '_genesis_custom_post_class' );  

Thanks to GaryJ over at StudioPress for this fix. He also said that the next update will fix the issue but you can do this above to get it working in the mean time. Hope this helps, enjoy!

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: CSS, StudioPress Genesis

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com