How to customise the Read More option in WordPress (inline and in code)
How to internationalise and translate your WordPress Plugin
Today I got a lovely request from Andrew over at WebHostingHub.com who asked if he could translate my P2 Header Ad plugin into Spanish. “Of course”, I thought – and then I realised that I knew not much about how to get a plugin translation ready. I knew POEdit of course, but how to make … Read more
How to link to graphic assets within WordPress Plugins
When you want to display graphics that reside inside your own plugin directory you can serve those via a handy built-in WordPress function called plugins_url. It works just like its counterpart get_stylesheet_directory_uri does in themes. For example, if you’d like to link to a file that resides at http://yourdomain.com/wp-content/plugins/your-plugin/images/your-graphic.png then you can write this URL … Read more
How to link to graphic assets within WordPress Themes
When you’re displaying graphics that are served from your own theme directory, hard coding is never a good idea. In fact it’s impossible because you don’t know your user’s URL. There are a couple of built-in WordPress functions that can help us here. One of them is called get_stylesheet_directory_uri which returns the URL to your … Read more
How to add a WordPress user directly to the database
Sometimes you may want to add a new user to your WordPress site without accessing the admin interface. Here’s how we do that.
We need the following ingredients:
- MySQL access details (host, username, password, database name – you can extract this from wp-config.php)
- phpMyAdmin (or equivalent database management tool, such as Sequel Pro)
Let’s get started!
How to backup and restore your WordPress site with Plesk
In this podcast I’ll show you how to backup and restore your website with Plesk 11.5. Backup and Restore in Plesk can be very easy and straightforward – and it’s fantastic when it works. There are cases though when it does not, so here are few things to keep in mind. Automatic backups may fill … Read more
How to test if a custom header image is used in WordPress
You can use a handy function named get_header_image() for this. It will return the image uploaded by a user, or an empty string if a custom header image is not used. You can base decisions on this query: if (get_header_image() == ”) { // if no header image is present, do this } else { … Read more
Super awesome code generator for WordPress Developers by…
Super awesome code generator for WordPress Developers by Rami Yushuvaev