Archives: Snippets

Admin Bar Icon New Order Count

I recently saw a question from Ashley in the WooCommerce Community Facebook about adding an Admin Bar icon to indicate New Orders. I thought that’s a great idea to have a shortcut right there at the top of the page. So here’s a small code snippet that does it: The first thing the code does …

Admin Bar Icon New Order Count Read More »

Rounding Prices in WooCommerce

I noticed a question today from Darren in the WooCommerce Community Facebook group. Darren’s question is: “I’m using a currency switcher based on where the visitor is located. My site is set in US dollars. Is there any snippet code to round up the product price to .99 for the other non US countries?” A …

Rounding Prices in WooCommerce Read More »

Cart Fees

Do you need to add some type of fee to your shopping cart? An extra line item not associated with a product? In the following article I’ll show you a couple ways this can be accomplished. The above code includes two examples. The first example adds a simple “Special Handling Fee” of $5.25 to the …

Cart Fees Read More »

Show Post View Count

Have you ever wanted to display a count of the current post’s views? Here’s a small code snippet that you can add to your site to accomplish this: In this example, I’m using the ‘genesis_after_content’ action to hook into a point within the Genesis Framework’s actions in order to display the view count after the …

Show Post View Count Read More »

Site Functionality Plugin

I feel that the best way to add code snippets to your site is through what many developers call a “Site Functionality Plugins.” This is because, unlike a theme’s functions.php file, a custom plugin will never be overwritten when/if you update your theme. Better yet, the plugin’s features are not lost if you decide to …

Site Functionality Plugin Read More »