Hi,
During WP 3.3.2, single-products.php was serving ' products ' custom post type. Since, I upgraded WordPress version from 3.3.2 to 3.4.1, I discovered permalink returns 404 error on Custom post type ' products '.
After adding following code in functions.php, it doesn't return 404 error, but redirect to homepage and still reluctant to serve requested content.
function produc_rewrite() {
global $wp_rewrite;
$wp_rewrite->add_permastruct('products', 'products/%postname%/', true, 1);
add_rewrite_rule('products/([^/]+)/?$', 'index.php?post_type=products&postname=$matches[1]', 'top');
$wp_rewrite->flush_rules(false); // !!!
}
add_action('init', 'produc_rewrite');
I also have tried to disable all plugin and deactivated current theme to default theme 'twentyeleven', but nothing fruitful. Please assist me to recover my content for ' products ' custom post type.
Regards