Tag: Code

  • Pretty permalinks without mod_rewrite

    Pretty permalinks without mod_rewrite

    There are still some third-class web hosters who do allow the .htaccess files … and turn off the standard module mod_rewrite. But without mod_rewrite, WordPress cannot use pretty permalinks, right? Wrong! There’s another directive we can use: ErrorDocument. ErrorDocument 404 /index.php This will do almost the same as the rewrite rules WordPress offers. It will…

  • Advent Calendar – WordPress Editor: Preserve the scroll position

    Advent Calendar – WordPress Editor: Preserve the scroll position

    WordPress has a nice editor, with which are several hundreds of articles written daily. But in my opinion the editor has an usability issue. Every time you save a post the scroll position of the editor will be on top again. If you want to continue writing the post you have first to find he…

  • Advent Calendar – Predefined callback functions for filters

    Advent Calendar – Predefined callback functions for filters

    Filters are often used for removing content. For example, if you want to hide the admin bar you can do the following: function hide_admin_bar() { return FALSE; } add_filter( ‘show_admin_bar’ , ‘hide_admin_bar’ ); It’s a bit tedious to define an additional function just to return “FALSE“. Since version 3.0 WordPress provides various functions to shorten…

  • Advent Calendar- How to disable comments for WordPress pages in any theme

    Advent Calendar- How to disable comments for WordPress pages in any theme

    Usually you don’t need comments on pages. Unfortunately, WordPress doesn’t offer a separate option to leave comments on posts on and turn them off for pages. If your theme calls comments_template(); in its page.php and you don’t want to break automatic updates, you cannot just remove the function call, because it will be overwritten with…

  • Advent Calendar – Only Update The Core – The Fast Way!

    Advent Calendar – Only Update The Core – The Fast Way!

    Same procedure as every year! Most of our readers already know of our Advent Calendar tradition, which we have every year before Christmas. What exactly an Advent Calendar is all about, that is explained on this post. We open a door every day, which contains a little gift for our readers, by providing them a…

  • Use Constants for deactivate the Editor in WordPress Backend

    WordPress is known for, that several constants lie dormant in the core and often provide quick solutions. In this context I have recently come across two little strings in the core of the backend editor of WordPress and in the core for updating the system as well. As far as I know, all constants mentioned…