Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Added Basic Woocommerce Support #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ function wp_bootstrap_theme_js(){
get_template_directory_uri() . '/bower_components/modernizer/modernizr.js',
array('jquery'),
'1.2' );

wp_enqueue_script( 'bootstrap' );
wp_enqueue_script( 'wpbs-js' );
wp_enqueue_script( 'modernizr' );
Expand Down Expand Up @@ -707,4 +707,24 @@ function wp_bootstrap_filter_ptags_on_images( $content ){
}
add_filter( 'the_content', 'wp_bootstrap_filter_ptags_on_images' );


//------------------------------------------------------------------------
// the following code adds suppport for woocomerce integeration
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);

add_action('woocommerce_before_main_content', 'wp_bootstrap_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'wp_bootstrap_wrapper_end', 10);

function wp_bootstrap_wrapper_start() {
echo '<div id="content" class="clearfix row">';
}

function wp_bootstrap_wrapper_end() {
echo '</div>';
}

add_theme_support( 'woocommerce' );
// ----------------------------------------------------------------------

?>