This took me ages to get my head around in order to setup WordPress coding standards in VSCode for Windows. Even using the great plugin Intelephense it doesn’t allow WordPress coding conventions which differ to PSR12. I’ll outline the steps below to get this working in Windows. Install and download the Composer-Setp.exe Install PHP CodeSniffer […]
WordPress AJAX Live Search No jQuery Dependency
Here is a shortcode that I developed for WordPress to enable AJAX searching of the post title without relying on AJAX. There is a big push to move away from using iQuery and just use native functions of the browser to achieve the same objectives. My solution will detect when the shortcode is used and […]
WooCommerce Mini Cart Divi Menu Header Not Updating
If your Divi theme is not updating the menu header WooCommerce cart count when you add an item via AJAX there’s a fix. Use the following WooCommerce snippet to ensure the cart contents count is updated in the Divi navigation menu having to refresh the page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
/** * Refresh WooCommerce fragments for Divi cart count. * * @param array $fragments * @return void */ function es_fresh_cart_fragments($fragments) { ob_start(); et_show_cart_total(); $cart_total_html = ob_get_clean(); $fragments['.et-cart-info'] = $cart_total_html; return $fragments; } add_filter('woocommerce_add_to_cart_fragments', 'es_fresh_cart_fragments', 10, 1); |
The trick here to ensure the cart […]
Travel Signals – Find Best Months To Travel
Just finished building a website that help you find the best months to travel to a destination. It also shows you valuable information regarding that city such as visa requirements, weather, cost of general items and any safety information for the country. Check it out now to find out the best months to travel to […]
Travel Signals
Help you decide when to visit a destination. […]
Change Background Color Photoswipe WooCommerce 3
To change the background of WooCommerce 3 new photoswipe lightbox which appears in the single-product.php template, use the following CSS in your theme to invert the colors to white.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
.pswp__bg {background: #FFF !important;} .pswp__caption, .pswp__top-bar { background: #000 !important; } .pswp__ui h3, .pswp__ui button, .pswp__button:before { color: #000 !important; } button.pswp__button--arrow--left::before, button.pswp__button--arrow--right::before { background-color:#000 !important; } .pswp__counter { color: #FFF !important; } |
[…]
Cancel Sent Facebook Friend Requests
How do you cancel sent Facebook friend requests? With this service linked below from Fiverr you will be able to bulk remove all sent Facebook friend requests. It’s annoying to have to individually press the undo button to delete a sent Facebook friend requests so this service will save you hours of hassle! Especially if you have thousands of Facebook friend requests […]
Stepping Out of Your Comfort Zone
As an individual I think it’s very important for your mental sate of mind and well being to constantly challenge yourself. At the moment I’ve fallen into the trap of complacency. I could very easily work in my current position for the rest of my days but I know that on my death bed I […]
How To Change Facebook Link Thumbnail and Description
To change the Facebook link thumbnail and description in WordPress we need to utilise a coding technology called “OpenGraph”. This allows a website to tell Facebook what information to display when someone shares a link. Facebook for Developers has a tool known as Debugger that allows a user to see what a Facebook link will […]
Disable WooCommerce Payment Gateways Based On Cart Amount
Disable WooCommerce payment gateways is fairly straight forward once you know what the name of the gateway is. The following code will disable paypal and stripe payment gateways on the WooCommerce checkout page when the cart amount is greater than $1000. You can adjust the code to disable payment gateways based on certain products that […]