WordPress Archives

Tips and Tricks on WordPress usage and development. I am very passionate about WordPress, but it doesn’t work just by itself – it needs a rich environment to live and breathe in.

If you’re after theme and plugin alterations, we have a category for that.

How 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 touch.

Read more

How 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 because it would be … Read more

How 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 … Read more

How to use jQuery UI elements in the WordPress admin interface

One thing I’ve been struggling with was to use jQuery UI elements in my plugins, for example jQuery UI Tabs. Even though the libraries are included with WordPress, I couldn’t get them to work. Thanks to Pippin’s Plugins I could figure it out – thanks, Pippin! My initial mistake was the way I created the … Read more