WooCommerce supports hundreds of currencies, but there may be a situation when you need to add your own. It's really simple to do, and just requires a code snippet. Let's say for example you want to add Bitcoin to WooCommerce. The currency code for Bitcoin is "XBT" and its symbol is "฿" add_filter( 'woocommerce_currencies', 'snippetpress_add_currency' ); function … [Read more...] about Add a Custom Currency to WooComerce
Rename a Country in WooCommerce
If you would like to rename a country in WooCommerce, it's as simple as adding a code snippet to your site. The following example changes "Ireland" to "Republic of Ireland": add_filter( 'woocommerce_countries', 'snippetpress_rename_countries' ); function snippetpress_rename_countries( $countries ) { $countries['IE'] = 'Republic of Ireland'; return $countries; } The … [Read more...] about Rename a Country in WooCommerce
How to Modify Text in a WordPress Plugin or Theme Without Another Plugin
We've all been there, you've found the perfect theme or plugin for your site, but the wording on that button just isn't right. Or maybe you need to change the word Cart to Basket in WooCommerce. Whatever it is, you've probably come across plugins that will change the text for you, but what if you want to do it without having to install another plugin? One thing's for certain … [Read more...] about How to Modify Text in a WordPress Plugin or Theme Without Another Plugin
Limit the WordPress Search to Specific Post Types
By default, WordPress will return all post types in its search results. If you need to limit the search results to specific post types, you can use the follwoing snippet: add_filter( 'pre_get_posts', 'snippetpress_search_post_type' ); function snippetpress_search_post_type( $query ) { $post_types = array( 'post', 'page', ); if ($query->is_search && … [Read more...] about Limit the WordPress Search to Specific Post Types
How to Exclude Specific Tags and Categories from WordPress Search Results
Sometimes there may be certain categories or tags that you don't want to appear in your WordPress search results. You could use a plugin to exclude posts that are in these categories or tags, or you could just add a little snippet to your site. Excluding Categories To exclude posts that are in a specific category from your WordPress search, simply use the following … [Read more...] about How to Exclude Specific Tags and Categories from WordPress Search Results