Firstly, thank you Microkid for a great plugin. I hope you dont mind me posting this fix for CPT and perhaps you could use it to update the next version ??
whipd09, I have found a hack to satisfy your #1 request until it makes it into the plug-in.
In the microkids-related-posts.php
I changed the following:
1. change: function MRP_add_custom_box() {
add_meta_box( ‘MRP_sectionid’, __( ‘Related Posts’, ‘MRP_textdomain’ ), ‘MRP_inner_custom_box’, ‘post’, ‘normal’ );//remove this line if you dontwant it to show in normal posts
add_meta_box( ‘MRP_sectionid’, __( ‘Related Posts’, ‘MRP_textdomain’ ), ‘MRP_inner_custom_box’, ‘archives’, ‘normal’ );//change archives to the name of your custom post type. You could also add more types by copying this line for each type.
2.function MRP_inner_custom_box() {
change: if( $related_post->post_type == ‘page’ ) { to if( $related_post->post_type == ‘archive’ ) {
3. change $post_title = “[Page] ” . $post_title; to $post_title = “[Archive] ” . $post_title;
4. function MRP_save_postdata( $post_id ) {
change: if ( ‘page’ == $_POST[‘post_type’] ) { to if ( ‘archives’ == $_POST[‘post_type’] ) {
5. function MRP_auto_related_posts( $content ) {
if( get_post_type() == ‘page’ ) { to if( get_post_type() == ‘archives’ ) {
Lastly in mrp-search.php, change:
$query = “SELECT ID, post_title, post_type, post_status FROM $wpdb->posts WHERE $where AND ( post_type = ‘archives’ OR post_type = ‘page’ ) “; to your post type.
Hope it helps someone.
Edit: I also added this into admin_init() function in my custom functions file when registering the CPT: add_meta_box( ‘MRP_sectionid’, __( ‘Related Links’, ‘MRP_textdomain’ ), ‘MRP_inner_custom_box’, ‘archives’, ‘normal’ );