OK, so it looks like this was due to the original author’s declaration of the Products post type (pasted below). I created a different implementation based off of Googling some examples (further below), but the only problem is one product type doesn’t work. Is there something amiss in what I did further below? In the original implementation, the add_rewrite tags are what kills the blog functionality.
add_action('init', 'products_post_type');
function products_post_type()
{
global $wp_rewrite;
$labels = array(
'name' => 'Products',
'singular_name' => 'Product',
'add_new' => 'Add New',
'add_new_item' => 'Add New Product',
'edit_item' => 'Edit Product',
'new_item' => 'New Product',
'view_item' => 'View Product',
'search_items' => 'Search Products',
'not_found' => 'No Products found',
'not_found_in_trash' => 'No Products in the trash',
'parent_item_colon' => ''
);
register_post_type('products', array(
'labels' => $labels,
'public' => true,
'menu_icon' => 'dashicons-category',
'capability_type' => 'page',
'has_archive' => false,
'hierarchical' => true,
'menu_position' => 20,
'supports' => array('title', 'editor', 'custom-fields', 'revisions', 'page-attributes', 'thumbnail'),
'rewrite' => false
));
// Manually create Products rewrite rules without slug in URL (by default WordPress will prepend all URL's with custom post type's slug)
$wp_rewrite->add_rewrite_tag('%products%', '(.+?)', 'products=');
$wp_rewrite->add_permastruct('products', '%products%', array('ep_mask' => EP_PERMALINK));
/*echo '<pre>';
print_r(get_option('rewrite_rules'));
echo '</pre>';*/
}
————————————————————————–
function products_post_type() {
register_post_type( 'Products',
// CPT Options
array(
'labels' => array(
'name' => __( 'Products' ),
'singular_name' => __( 'Product' ),
'add_new'=> __( 'Add New' ),
'add_new_item'=> __( 'Add New Product' ),
'edit_item' => __( 'Edit Product' ),
'new_item' => __( 'New Product' ),
),
'public' => true,
'has_archive' => false,
)
);
}
// Hooking up our function to theme setup
add_action( 'init', 'products_post_type' );