';
}
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end' );
add_action( 'woocommerce_after_main_content', 'colorist_output_content_wrapper_end' );
function colorist_output_content_wrapper_end () {
echo "
";
}
add_action( 'init', 'colorist_remove_wc_breadcrumbs' );
function colorist_remove_wc_breadcrumbs() {
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
}
/* Tempalte redirect */
add_action('after_setup_theme', 'colorist_rename_template');
if( !function_exists('colorist_rename_template') ) {
function colorist_rename_template() {
$args = array(
'post_type' => 'page',
'posts_per_page' => -1
);
$template_query = new WP_Query($args);
if( $template_query->have_posts() ) {
while ( $template_query->have_posts() ) :
$template_query->the_post();
$old_template_name = get_post_meta( get_the_ID(), '_wp_page_template', true );
// echo $old_template_name .'';
switch ( $old_template_name ) {
case 'page-full-width.php':
$new_template_name = 'template-full-width.php';
break;
case 'page-leftsidebar.php':
$new_template_name = 'template-leftsidebar.php';
break;
case 'page-rightsidebar.php':
$new_template_name = 'template-rightsidebar.php';
break;
default:
$new_template_name = $old_template_name;
}
if( $old_template_name != $new_template_name) {
update_post_meta( get_the_ID(), '_wp_page_template' ,$new_template_name ,$old_template_name );
}
endwhile; // end of the loop.
}
$template_query = null;
wp_reset_postdata();
}
}