'www.facebook.com',
'twitter' => 'www.twitter.com',
'googleplus' => 'www.plus.google.com',
'linkedin' => 'www.linkedin.com',
'pinterest' => 'www.pinterest.com'
);
$rws_social = '
';
foreach ( $rws_business_default_social as $key => $link ){
$rws_social .= sprintf( '- %2$s
', esc_url( $link ), $key );
}
$rws_social .= '
';
echo $rws_social;
}
function rws_business_default_menu (){
$rws_business_default_menu = array (
'Privacy Policy' => '#',
'Sitemap' => '#',
);
$rws_default_menu = '';
foreach ( $rws_business_default_menu as $key => $link ){
$rws_default_menu .= sprintf( '- %2$s
', $link, $key );
}
$rws_default_menu .= '
';
echo $rws_default_menu;
}
function rws_business_default_primary_menu (){
$rws_business_default_primary_menu = array (
'Home' => esc_url( home_url( '/' ) ),
'About Us' => '#',
'Services' => '#',
'Shop' => esc_url( home_url( '/shop' ) ),
'Contact Us' => '#',
);
$rws_default_menu = '';
foreach ( $rws_business_default_primary_menu as $key => $link ){
$rws_default_menu .= sprintf( '- %2$s
', $link, $key );
}
$rws_default_menu .= '
';
echo $rws_default_menu;
}
add_action ( 'rws_business_default_primary', 'rws_business_default_primary_menu', 10 );
add_action ( 'rws_business_default_footer', 'rws_business_default_menu', 10 );
add_action ( 'rws_business_default_social', 'rws_business_default_social', 10 );
/*---------- Woocommerce hooks starts here----------*/
//removing woocommerce sidebar from shop and product archive pages
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ) ;
// change the number of items per page
add_filter('loop_shop_per_page', 'rws_business_shop_item_per_page');
if ( !function_exists( 'rws_business_shop_item_per_page' ) ) {
function rws_business_shop_item_per_page() {
return 8;
}
}
// remove output container wrapper from shop @function woocommerce_output_content_wrapper -10
remove_action ( 'woocommerce_before_main_content','woocommerce_output_content_wrapper', 10 );
//remove @function woocommerce_output_content_wrapper_end -10
remove_action ( 'woocommerce_after_main_content','woocommerce_output_content_wrapper_end', 10 );
/**
* adding container start and end
*/
add_action ( 'woocommerce_before_main_content','rws_business_content_wrapper', 10 );
add_action ( 'woocommerce_after_main_content','rws_business_content_wrapper_end', 10 );
/**
* Woocommerce shop wrapper start
* @return void
*/
function rws_business_content_wrapper (){
echo '';
}
/**
* Woocommerce shop wrapper end
* @return void
*/
function rws_business_content_wrapper_end (){
echo '
';
}
//removing the single product meta.
remove_action ( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
// replacing the single product meta
add_action ( 'woocommerce_single_product_summary', 'rws_business_single_product_meta', 40 );
/**
* Changing the woocommercesingle product meta
* @return void
*/
function rws_business_single_product_meta (){
global $post, $product;
$cat_count = sizeof( get_the_terms( $post->ID, 'product_cat' ) );
$tag_count = sizeof( get_the_terms( $post->ID, 'product_tag' ) );
?>