WP Development

How to Add a WordPress Admin Menu Notification Bubble

Adding one of those nifty WordPress admin menu notification number bubbles to your custom menu/submenu is quite easy. The Basics Just append the following snippet to your menu/submenu name and you’re good to go: $menu_title .= ‘ ‘ . $count . ”; Updating an Existing Menu Adding a bubble to an existing menu/submenu is almost equally easy, and simply adds hooking into an action and identifying the menu item you wish to update. Lets say we want to a…

Read More

WooCommerce reviews + tutorials

Create an Overrideable WooCommerce Template File

Sometimes when developing a WooCommerce plugin you want to output a snippet of HTML, and do so in such a way that the content can be easily overridden by a theme. It’s part of the process of crafting a well-engineered, customizable plugin. The best way to achieve this is by using WooCommerce’s own templating mechanism, and what once took some effort and some filters is now a snap thanks to one of the recent WooCommerce releases (I tell ya, it jus…

Read More

WordPress development tutorials

How to Create a Custom WordPress Post Type With Image Uploads

This article details one method of creating a custom WordPress post type with the ability to upload and attach images using the built-in WordPress Media browser. This piece does not cover all the details and nuances of creating a custom post type, as this is covered well elsewhere. In addition to highlighting the most important methods and code required, I have attached a fully functional demo plugin which you may feel free to download and use as…

Read More

SkyVerge WooCommerce Extensions

WordPress Pretty Category Permalinks Broken and Fixed

This is probably another one of those situations that applies only to me, but just in case someone else out there happens to have this same broken permalink issue, I’ll describe what happened to my site, and how I fixed it. The specifics of my setup were: WordPress 3.4.1, WordPress SEO 1.2.5, and the custom permalink structure /%category%/%postname%/. The problem that someone thankfully alerted me to (gotta get back in the habit of checking Googl…

Read More

Hide Certain WooCommerce Sub-Categories in Catalog

WooCommerce provides some coarse control over displaying sub categories in your shop/category pages with the “Show subcategories on category pages” and “Show subcategories on the shop page” options on the WooCommerce > Settings > Catalog > Catalog Options section. These controls are all-or-nothing though: show all subcategories on the category pages, or show all subcategories on the shop page. If you want finer-grained control, for instance displ…

Read More

WP Development

Writing a Plugin That Can Be Localized by WPML

Writing a custom plugin that can be translated by WPML (WordPress Multilingual) using .mo files is actually quite simple once you figure out how to generate the .mo file. My first attempt to internationalize my plugin with WPML however was less than successful, WPML would not localize my plugins text strings. I knew my .mo file was correct, and could be loaded by WordPress because when I set WPLANG to my target locale in wp-config.php, my plugins…

Read More

WP Development

Extending the WordPress XML-RPC API

The purpose of this article is to describe the WordPress XML-RPC API, explain how to use it, and demonstrate how to extend it to create custom API methods for interacting programmatically with WordPress. I assume a relative unfamiliarity with XML-RPC in general, WordPress XML-RPC, and spend time first covering the basics, if you want to skip straight to the section on extending the WordPress XML-RPC API, feel free to. What is XML-RPC? As defined …

Read More

Ask SkyVerge

Hide WooCommerce "Free" Price Label

A common WooCommerce question lately has been how to hide the “Free” price label in the product/category/shop pages. Thanks to WooCommerce’s judicious use of filters/actions, this is very easy request, yet if you’re new to WordPress/WooCommerce you might not necessarily know exactly where to look. Well look no further, because here’s an easy way to suppress that “Free” notice for regular/variable products: add_filter( ‘woocommerce_variable_free_p…

Read More

WooCommerce Order Admin Calc Line Totals

Compatibility Notice: The following article and code applies to pre-WooCommerce 2.1 only. It is not compatible with WooCommerce 2.1+ As of version 1.6.5.2 at least, WooCommerce does not provide a way to automatically calculate the Line Subtotal and Line Total values for a given product quantity, when creating or updating an order through the Order Admin: As shown in the above image, there’s a button to calculate the line taxes for the order items…

Read More

WordPress development tutorials

Translating a WordPress Plugin on the Command Line Step by Step

The purpose of this article is to provide a quick and easy to follow step-by-step guide to extracting text strings from a WordPress plugin for translation from the command line. Although this is documented in the codex: I18N for WordPress Developers and Translating WordPress, those articles are somewhat lengthy and the first time I was asked to internationalize a plugin it took me some time to find the actual steps to generate my POT file. The co…

Read More