How to prepare the WordPress Theme woocommerce

Der’; Add\u theme_support (‘wc Product Gallery zoom’); Add\u theme_support (‘wc Product Gallery lightbox’); Delete store Title many topics already have the ability to display archived titles, so this code will delete additional titles from woocommerce, so it is best to hide them through CSS. Add\u filter (‘woocommerce_show\u page\u Title’,’\u return\u false’); If the archive Title Change topic of the store uses the archive_title() or get\u archive_title() function to display the title of the archive, you can easily adjust the filter to get the product page name instead of the store archive title. The
Function wpex_woo_archive_title ($title) {if (is_shop() & $shop_id = wc\u get\u page\u ID (‘shop’)) {$title = get\u the\u title ($shop\u ID);} Return $title;} Add\u filter (‘get\the\archive\u Title’,’wpex\woo\archive\u Title’); Change the number of products displayed per page in the store lets you change the number of products displayed per page in the store and product archives (categories and labels). The
\/\/Alter woocommerce shop posts per page function wpex_woo_posts_per_page ($cols) {return 12;} Add\u filter (‘loop\u shop\u per\u page’,’wpex\u woo\posts\u per\u page’); Although you do not understand why changing the number of columns displayed in the store per row changes the way woocommerce works, you cannot change the \
\/\/Alter shop columns function wpex_woo_shop_columns ($columns) {return 4;} Add\u filter (‘loop\u shop\u Columns’,’wpex\woo\u shop\u Columns’\/\/ Add correct body class for shop columns function wpex\u woo\shop\columns\body\u class ($classes) {if (is\shop() \is\product\category() \is\product\tag()) {$classes[] =’columns-4′;} Return $classes;} Add\u filter (‘body\u class’,’wpex\u woo\shop\u columns\body\u class’); Use the \
Function wpex_woo_pagination_args ($args) {$args[‘prev_text’] = ‘male’; $args[‘next\u text’] = ‘male’; return $args;} Add\u filter (‘woocommerce\pagination\u args’,’wpex\u woo\pagination\u args’); Onsale badge text changes are particularly useful for removing sites in other languages or exclamation points that I don’t like. The
Male function wpex_woo_sale_flash() {return ‘male’. Esc\u html\u (‘sale’,’woocomerce’). ‘male’;} Add\u filter (‘woocommerce\u sale\u Flash’,’wpex\u woo\u sale\u Flash’); Product Geller
Change the layout according to the re thumbnail column. You can change the number of columns of a single product Gallery thumbnail. This is its function. Function wpex_woo\u product\u thumbnails\u columns() {return 4;} Add\u action (‘woocommerce\u product\thumbnails\u Columns’,’wpex\u woo\product\thumbnails\u Columns’); Change number of related products displayed lets you change the number of products displayed for related products on a single product page\/\/ Set related products to display 4 products function wpex\u woo\related\u posts\u per\u page ($args) {$args[‘posts\u per\u page’] = 4; return $args;} Add\u filter (‘woocommerce\u output\related\u products\args’,’wpex\u woo\related\u posts\u per\u page’); Just like the change store of the number of rows and columns in the product related and upsell sections, to appropriately change the number of columns of related and upsell products on a single product page, you must filter the columns and change the body class accordingly\/\/ Filter up sell columns function wpex_woo_single\loops\u columns ($columns) {return 4;} Add\u filter (‘woocomerce\u up\sellers\u Columns’,’wpex\u woo\u single\loops\u Columns’)\/\/ Filter related args function wpex_woo_related_columns ($args) {$args[‘columns’] = 4; return $args;} Add\u filter (‘woocommerce\u output\related\u products\args’,’wpex\u woo\related\u Columns’, 10)\/\/ Filter body classes to add column class function wpex\u woo\u single\loops\u columns\u body\u class ($classes) {if (is\u single (‘product’)) {$classes[] =’columns-4′;} Return $classes;} Add\u filter (‘body\u class’,’wpex\u woo\u single\loops\u columns\u body\u class’); Add dynamic cart links and cart charges to the menu this snipet adds a woommerce cart item to the menu, which displays the charges for items in the cart. In addition, if the site has font awesome enabled, a small shopping bag icon is displayed. Important: this function cannot be wrapped by the is_admin() condition. Because is_admin() depends on Ajax to update the cost of whether the function can be used when returning true and false\/\/ Add the cart link to menu function wpex_add_menu\cart_item_to_menu ($items, $args) {\/ \/ make sure your change’wpex_main’to your menu location!!!! if ($args->theme_location = =’wpex_main’) {$css_class =’Menu item type cart menu item type woman cart ‘; if (is\cart()) {$css_class. =’ current menu item ‘;}$ Items. = ‘ Male ‘$ Items= Wpex_menu\cart\u item()$ Items. = ‘ Male ‘;} Return $items;} Add\u filter (‘wp\nav\menu\u items’,’w

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *