This code snippet allows you to create an administrator then delete it after you’re done with your work on the website. It’s very useful when the client gives you only FTP or CPanel and you have many websites to work on.
The problem with a lot of “multipurpose” themes is that when they override the default behaviors of WordPress or one of its plugins, they forget to re-introduce the filters that were there before they did their thing.
The buying process on a WooCommerce store for most goes like this: The user spots a product He adds it to the cart He goes to the checkout page He pays for it What if we could get rid of the cart altogether and provide a more friendly user experience instead of this Walmart-ish approach?… Continue reading How to Optimize Your WooCommerce Store for Single Product/Item Checkout
The WP CLI never ceases to impress me. You can do lots of things with just a few lines of code. In this code snippet, I let the WP CLI create 15 products with random images from Lorem Picsum, prices are also random within the 1-1000 range.
Google Contacts (the old version) allows you to import VCards, but you will have to import them one by one, this is clearly not very practical if you have more than 3 contacts that you want to import (you lazy!). Fear nothing, there is an easy workaround, you’ll merge your vCards before importing them, here’s how you… Continue reading How to easily import multiple vCards into Google Contacts
Wondering why some of the string in the theme or plugin you just translated aren’t found in the .po file or have weird plural form? This happens a lot because many translators don’t use the right configurations. So besides the search path in Poedit, make sure you have the right configuration for plural forms and… Continue reading Arabic translation files for WordPress
Update Code on this post has been made into a plugin, the plugin is more complete and handles a wider range of locales. Are you having problems to get the Disqus Comment System WordPress plugin to work with your site language (Arabic, French…). Here is the code you are looking for:
These are a few commands I use in situation where I can’t use Eclipse for refactoring my code, you can use them by replacing from and to with the names you want. No need to remind you to take backups to prevent irreversible loss of data.
If you have modified or deleted a file by mistake on a git tracked project, you can still revert your action and reset the file like this: