Articles Tagged 'add_filter ()'

WordPress Snippet: Remove the admin bar

The latest version of WordPress has added a new toolbar frontend side when the administrator is logged. If you want to disable this code included in the file functions.php of your theme:

1
2
3
4
/ / Check to see if the filter show_admin_bar
has_filter ( 'show_admin_bar' ) ) { if (has_filter ('show_admin_bar')) {
, '__return_false' ) ; add_filter ('show_admin_bar', '__return_false');
}

Continued ...

10 useful WordPress snippets

With the release of WordPress 3.0 will change many things for us developers. Updates to this major release are many and very useful for those developing with this CMS now truly complete. We could say that if you close one era and opens a new and full of possibilities. I pay tribute to the then previous versions with a range of useful snippets some very valid even with the new release.

Continued ...

WordPress: filter the content of the comments

I've had to fix an annoying problem on a WordPress blog: users left comments with long sentences. This produced the release of the text, both in the backend, even worse, in the frontend. The effect was really horrible and to avoid hand-to moderate every single comment, the only solution was to filter out - somehow - the output of the comments.

Continued ...

Very short trick: WordPress, excluded from the search pages and post

The motor inside of WordPress used for research (the standard without the addition of plug-in) performs a classic low-level query_post() . The search is dapperttutto without exclusion. This feature can be controlled, however, allowing, for example, to search all over except in special categories, pages or posts.

Continued ...