How to use a custom font in CSS
Did you know that with CSS 3 you can load custom true type fonts and use them on your website? It’s relatively simple to do too. First you define a new font face with a URL to your file, then you call it just like you would call a pre-defined font. In this example I’m using the Old Typewriter font from http://www.dafont.com/old-typewriter.font. Once unzipped you’ll end up with a standard .ttf file that you can reference like so: @font-face { font-family:”Old-Typewriter”; src:url(Old-Typewriter.ttf); } Now you can...
read moreFantastic CSS Border Radius generator for all browsers…
Fantastic CSS Border Radius generator for all browsers by @jacob Bijani http://border-radius.com/
read moreSuper awesome code generator for WordPress Developers by…
Super awesome code generator for WordPress Developers by Rami Yushuvaev...
read moreHow to change your WordPress URL when installed in a subfolder
Oftentimes people install WordPress in a subdirectory of the main website. One-click installers like to do this. Say your domain is http://example.com, but WordPress lives in http://example.com/wordpress. By default this means that people will have to visit your website at the latter URL. But what if you want your URL to be http://example.com, without that /wordpress at the end? No problem I say – let me talk you through it. It may sound scary, but that’s just because we have to do some tweaks to files we don’t normally...
read moreHow to override a parent function from your Child Theme
When you’re writing a Child Theme you can easily add your own functions to a custom functions.php file. But sometimes you want to replace or remove a function that the original theme provides. Because the Child Theme’s functions.php file is loaded BEFORE the parent’s file, you can’t just define the same function again as it will be overwritten. You also can’t rely on the original theme providing a “pluggable” parent function, as suggested in the WordPress Codex. What you can do however is to remove...
read moreHow to find the directory of your WordPress Theme in PHP
To get the directory of the current theme (or child theme) you can use get_stylesheet_directory_uri(). Here’s how to use it. Let’s assume that your WordPress installation lives in http://demo.com, and that your theme is located in a folder named “my-super-theme”. We can assume then that the full URL that points at http://demo.com/wp-content/themes/my-super-theme/ The URL will of course be different for every user of your theme, so you can’t hard code this. Instead, you can use this handy function:...
read moreHow to fix “unexpected T_FUNCTION” error in PHP
I tested one of my plugins yesterday and was shocked to see a nasty error message: What was going on? I could have sworn this worked fine last time I tried! Then I remembered that I changed my PHP Version in MAMP, from 5.5.3 back to 5.2.17. And exactly therein lies the problem, because the code that was amiss was something like this: $zendash_updates = function ($a) { return null; }; This is what’s known as an anonymous function in JavaScript, and it didn’t exist in PHP until Version 5.3. If we wanted to be backward compatible, we...
read moreYou are a real guru my friend!
He find the code, he show the right way for editing it and it is working great now ! You are a real guru my friend ! :)) I really appreciate it. Thanks a lot…
read moreHow to change the admin footer bar in WordPress
The admin footer bar is the one line of text displayed at the very bottom of your admin interface. By default it reads “Thank you for creating with WordPress” on the left, and shows the current WordPress version on the right. You can however change this if you like. Perhaps you want to provide additional links to services you provide to your clients, or you may want to hide the version or WordPress branding – or you just want to de-clutter and feel that “less is more”. I head you! The two areas can be targeted...
read moreHow to get a link to a specific WordPress admin page
To get a reference to a specific admin page (such as Dashboard), we can use the admin_url(), network_admin_url() or get_admin_url() functions, like so: get_admin_url( ‘index.php’ ); You will need to pass the reference to the page you’d like to display. To find out how, simply click on the menu page in question, then look at the URL. Anything after wp-admin/ is the parameter. Those functions are described in detail in the WordPress Codex: http://codex.wordpress.org/Function_Reference/admin_url...
read more