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

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!

   Related Sponsored Links

Disclaimer: The information contained in this website is for general information purposes only and in no event will this site or its owners be liable for any losses or damages associated with your use of our site or content. Click here to see our full Disclaimer.

Leave a Comment

*