Custom posts with WP front-end editor

The WordPress front-end editor is a brilliant new tool which is being improved all the time as it is developed.  But one feature that is missing at present is the ability to edit custom post types.  While this may not be an issue for most WordPress sites, many popular WordPress plugins such as WooCommerce use custom post types for Products or other distinct article types.

With one simple change to the front-end editors code, we can add support for any selected custom post type with one line of code:

Find the lines of code below (lines 17 & 18 in the current 1.1 beta) in the class-fee.php file (found in the wp-front-end-editor folder of your plugins directory)

add_post_type_support( 'post', 'front-end-editor' );
add_post_type_support( 'page', 'front-end-editor' );

 

Add your custom post type in a new line (the entry below for example, will add support for WooCommerce products)

//Add our custom post type
add_post_type_support( 'product', 'front-end-editor' );

 

 2ft x 4ft Mesh Banner - Design your banner online!
An example of the front-end editor plugin working on a WooCommerce product post-type.

 

Leave a Comment