Tag Archives: Hints ‘n’ Tips

Browse through here to find nuggets of good practise and quick solutions to tricky problemtito.


WP_List_Table – a step by step guide

Throughout WordPress the class WP_List_Table is used to display data, e.g. users, plugins, comments, or posts. The class contains almost all necessary methods for displaying, sorting, paginating, and searching data and and what is more obvious than to use it for your own plugins? This article tries to give you a comprehensive walk-through all necessary […]


WordPress Dropins

Plugins are pretty popular, since it is easy to adjust your blog or website to your liking with Plugins. Less popular are Dropins. WordPress alows to replace some functions with Dropins. The list of possibilities isn’t big and not well documented. But I like to use Dropins to enhance the possibilties of caching, especially APC […]


Dynamic Copyright Year In Your Footer

The new year is already some days old but in many websites you still can see in their footer “copyright © 2006-2008 mysite.com”. Yeah Andy, on your blog too 😉 For everyone, who changes the year in their footer manually every year, here is a little tip: <p>copyright © 2006-<?php echo date(‘Y’); ?> mysite.com</p> With […]


WordPress and register_sidebar

Everyone who is building WordPress Themes probably implement the widget function in their theme. Code for the widgets is in functions.php. Here a code snippet of the default theme:       if ( function_exists(‘register_sidebar’) ) register_sidebar(array( ‘before_widget’ => ‘<li id=”%1$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h2>’, ‘after_title’ => ‘</h2>’, )); As we all know, […]


Disable WordPress Search

Not always is the search in WordPress desired. The one or another application with WordPress doesn’t need this feature. Even if it is an added value in my opinion. In some cases, it still shouldn’t be displayed and so I have them deactivated with access to two hooks. For now, I can see no other […]


Display The Total Number Of Registered Users

Anyone who operates a community using WordPress, and would like to display the total number of registered users, can easily and quickly use the following small code snippet. It reads via SQL the content of the table “users“, and the numbers of IDs getting counted. This value simply gets wrapped around a text. $myusers = […]


Change Wording for Password Page

If you create a password protected page in WordPress, you have the standard sentence: “My post is password protected. Please ask me for a password:”. To change this sentence without losing the changes after the next upgrade, just place into the functions.php of your theme the following code: function fb_the_password_form() { global $post; $label = […]


Exclude A Category From Turn Off Comments Automatically

Thanks to our post New Ideas For 2010? Now It’s Your Turn! we got an email form one of our loyal sponsors Chris Coyier. Hey WP Engineer folks! I have a little issue I’m trying to resolve on CSS-Tricks, regarding comments. In my discussion settings, I have it set to automatically turn off comments on […]


Redirects To Another Page In WordPress Backend

WordPress allows using a function, to simple redirect to a URL, the function wp_redirect() enables to specify an address and a status. This makes it easy to realize a forward even in the backend of WordPress. Two different examples will illustrate this. The difference lies in the query of the URL, which will be checked. […]


WordPress Child Themes – Remove Widget Areas

In a WordPress Framework or Basic-Theme are one or several Widget Areas (Sidebars) defined. But how can you remove the widget areas if you don’t need them and just confuse other backend users. The line unregister_sidebar(‘my-sidebar’); in functions.php of Child-Themes doesn’t do anything. Why? WordPress loads first the function.php of Child-Themes and then of the […]


Stop WordPress From Ever Logging Out

You don’t always want to login in WordPress – so I’ve turned off the login for my local development environment, since I don’t need it. So far I know two ways how to do this, which I want to introduce you briefly. Decide for yourself which is the right way for you if you don’t […]