codyred
Forum Replies Created
-
Forum: Plugins
In reply to: [Medium] Custom post typeSo After a couple hours of playing around I found a fix to add support for custom post types.
In the plugin folder : Medium->lib->medium-admin.php a few lines need to be changed.Line 46 :
add_action("add_meta_boxes_post", array("Medium_Admin", "add_meta_boxes_post"));
Needs to be changed to :
add_action("add_meta_boxes", array("Medium_Admin", "add_meta_boxes_post"));
*the action “add_meta_boxes_post” obviously only fires on the “post” post type.Line 290 :
WHERE p.post_type = 'post'
You will need to add a AND your post type line, so mine ended up looking like :WHERE p.post_type = 'post' AND p.post_type = 'courses'
* This will allow for CPT migration
On line 456
add_meta_box("medium", "Medium", array("Medium_Admin", "meta_box_callback"),null, "side", "high");
Will need to change “null” to an array of values, so mine looked like :
add_meta_box("medium", "Medium", array("Medium_Admin", "meta_box_callback"),array("courses","post"), "side", "high");
And finally on line 468 :
$allowed_post_types = apply_filters("medium_allowed_post_types", array("post"));
Needs to be updated with all the post types you need, so mine looked like:
$allowed_post_types = apply_filters("medium_allowed_post_types", array("post","courses"));
Hopes that helps
Forum: Plugins
In reply to: [Medium] How to enable Medium autoposting for Custom Post Types?So After a couple hours of playing around I found a fix to add support for custom post types.
In the plugin folder : Medium->lib->medium-admin.php a few lines need to be changed.Line 46 :
add_action("add_meta_boxes_post", array("Medium_Admin", "add_meta_boxes_post"));
Needs to be changed to :
add_action("add_meta_boxes", array("Medium_Admin", "add_meta_boxes_post"));
*the action “add_meta_boxes_post” obviously only fires on the “post” post type.Line 290 :
WHERE p.post_type = 'post'
You will need to add a AND your post type line, so mine ended up looking like :WHERE p.post_type = 'post' AND p.post_type = 'courses'
* This will allow for CPT migration
On line 456
add_meta_box("medium", "Medium", array("Medium_Admin", "meta_box_callback"),null, "side", "high");
Will need to change “null” to an array of values, so mine looked like :
add_meta_box("medium", "Medium", array("Medium_Admin", "meta_box_callback"),array("courses","post"), "side", "high");
And finally on line 468 :
$allowed_post_types = apply_filters("medium_allowed_post_types", array("post"));
Needs to be updated with all the post types you need, so mine looked like:
$allowed_post_types = apply_filters("medium_allowed_post_types", array("post","courses"));
Hopes that helps