Tag Archives: Hints ‘n’ Tips

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

wordpress-code-small

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 […]

wordpress-code-small

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 = […]

wordpress-code-small

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 = […]

css-code-small

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 […]

aptana-screenshot-small

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-code-01-small

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 […]

aptana-screenshot-small

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 […]

wordpress-code-small

Custom WordPress Login-Page

In a previous post I wrote about the possibility to adjust the login page in your WordPress backend. But I still receive a lot of questions about it and I would like to point out three simple ways, so that you can customize with little effort the login page to your site – a nice […]

aaf-wp

Plugin To Add Custom Field To An Attachment In WordPress

The media library is on WordPress in some areas, certainly not perfect, but it has great potential. Each attachment can contain various metadata and also WordPress stores some data directly while uploading – for example a part of the Exif data of an image. However, it might not be enough for you and you need […]

sql-feedcache

Delete all Feed Cache via SQL in WordPress

The Feed-Cache of WordPress is in the database, it’s in the table options and sometimes you like to delete it. With a little SQL this is done quite quickly – but be careful, there is no way back! Within WordPress I do it with the help of the Plugin Adminer, which allows a complete mySQL […]

wordpress-code-small

Exclude Post from WordPress Feed

In a previous post I provide a solution on how to exclude certain categories from your feed. You can do the same with other content and I will show you in this post how you can exclude certain posts from your feed. Therefore I use the filter posts_where (wp-includes/query.php), which is responsible for the output […]

wordpress-code-small

Exclude Posts and Pages in WordPress Search

Sometimes you don’t like to display every post and page on search results. Today I like to show you how to filter the search in your frontend. Therefore I add a filter to the query of WordPress and exclude the according posts or pages of the search. We exclude posts and pages by their ID, […]

css-code-small

Move WordPress Admin Bar to the Bottom

Not everybody likes the WordPress Admin Bar, which exists since WordPress 3.1, at the top of the browser. With just a bit CSS you can change it. The following function provides CSS directly in the footer of backend and frontend. It displays the Admin Bar at the bottom. You can expand the code as you […]

120px-Crystal_Clear_Password

Disable password fields for non-admins

So you’ve created a user and added a strong password because you care for your blog’s security? Unfortunately you can’t be sure that the user will keep this strong password since he/she can change it to a much weaker one on his profile page. This problem can be solved by adding a filter: if ( […]

wordpress-code-small

Replace p-Tag on Images in Content of WordPress

Personally I think the use of HTML5 makes sense and I like the new possibilities, also in the field of semantics. WordPress has a feature on delivering content that come from the editor – setting breaks and paragraphs. Since forever WordPress is the reason for that, not TinyMCE and the same applies to the integration […]