CP Redirect settings

Redirect your old College Publisher URLs to your new WordPress URLs by configuring this plugin. The previous article ID will need to be stored in either a custom field or match the WordPress post ID.

CP Redirect is:
Previous CMS:
Custom field for CP article IDs: or my WordPress post IDs match my College Publisher article IDs />
get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='$custom_field' AND meta_value='$article_id'", 'ARRAY_N'); $wp_id = $wp_id[0][0]; // Catch if there are duplicate results in the database } // If we have a WordPress ID to work with and it's legit, then make the redirect if ($wp_id != null && get_post($wp_id) != null) { $website = get_bloginfo('url'); $new_url = rtrim($website, '/'); $new_url .= '/?p=' . $wp_id; wp_redirect($new_url, 301); } else { return; } } } // WordPress hooks and actions add_action('admin_menu', 'cp_redirect_menu'); add_action('template_redirect', 'cp_redirect'); ?>