Create CSS Conditional Stylesheets for Internet Explorer in WordPress
…by the css path is preferred as the better way to declare the theme location rather than use the absolute URL like: http://mydomain.com/wp-content/mytheme/css/all-ie.css The get_stylesheet_directory_uri(); function is used to point…
Read MoreHide Amount of Items from Add to Cart Message in WooCommerce
…the below code snippet to your functions.php https://gist.github.com/neilgee/e037ee587b318a7e7369359ec48c39d6 On line 24 a ternary operator has been removed which displayed the quantity if greater than 1 – now when you add…
Read MoreWooCommerce Accordion Style Expand/Collapse Product Category Menu
…a link to the child category archive page. I have come across the original code (which I have modified) on a site with no credit/author reference. The toggle icons have…
Read MoreSend Full Product Details over WooCommerce Webhook Action Hook
…are returned. Function to send all product details To get around this limitation there is a function that can be added via the themes functions.php file or as a plugin….
Read MoreSet WooCommerce cart product count total to be divisible by number
…checkout. add_action( ‘woocommerce_check_cart_items’, ‘check_cart_items_conditionally’ ); /** * Check cart items conditionally displaying an error notice and avoiding checkout * @link https://stackoverflow.com/questions/65767078/disable-woocommerce-checkout-if-cart-items-count-is-not-a-multiple-of-n */ function check_cart_items_conditionally() { $multiple_of = 6; // <=…
Read MoreAdding Cloudflare to the mix of ServerPilot and fail2ban
…latest one on github from fail2ban 0.11.2 works fine. https://gist.github.com/neilgee/9e89fced25ee515876dee125758330a4 You just rename/backup the old cloudflare.conf and add in the new one above and add in your Cloudflare username/email and…
Read MoreSort WooCommerce products from product category to be last in cart order
…to be last order in cart * @link https://stackoverflow.com/questions/65800801/sort-specific-product-category-cart-items-at-the-end-in-woocommerce */ function product_category_cart_items_sorted_end() { $category_terms = __(‘box’); // Here set your category terms (can be names, slugs or Ids) $items_in_category =…
Read MoreChanging the Modern Tribe Events Date Format
…output. https://gist.github.com/neilgee/d67ff7310441b680e1d0ad575994b330 It is a shortcode [all_the_single_dates] that outputs the dates like so …. 09 – 14 September 2018 28 October – 02 November 2018 17 October 2018 So ……
Read MoreCreate a WooCommerce Featured Products Loop of Featured Images
…backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘. https://gist.github.com/neilgee/21cafcbb2037617158a56adb7b727a78 So in the above a shortcode is created; [woo_featured_products] ready…
Read More