Tag: WP

  • First or Last Page in Page-Structures of WordPress

    Now and then little snippets are pretty useful. For a fix in a Premium-Theme, I needed a kind of evaluation, where I am in the site structure and with little effort I was able to expand the classes and react with CSS. The following code shows the basic for it and get_pages() is the key…

  • Don’t use strlen()

    Don’t use strlen()

    Each time I see someone use strlen() I cringe. It will break. Despite its name, strlen() doesn’t count characters. It counts bytes. In UTF-8 a character may be up to four bytes long. So what happens if we use strlen() and its companion substr() to shorten the title of post? <?php # -*- coding: utf-8…

  • Stop SOPA!

    What is this all about: Help Stop SOPA/PIPA Turn off your website on January 18th for 12 hours. Simple and fast solution for turn the website off; use the Plugin WP Maintenance Mode, original for the activation of the maintenance mode; but its easy for this requirement. As useful; the plugin send an 503 Service…

  • Best Practice for Multilanguage WordPress Content? New Plugin!

    Best Practice for Multilanguage WordPress Content? New Plugin!

    Since the beginning of WordPress the desire to publish the content in different languages is huge. But the topic can quickly become complex, because not only the rendering of content in the form of text in different languages ​​is an issue, we also have to take care of the meta data for content, for images…

  • Separate Logic From Output

    Separate Logic From Output

    Once HTML is defined within a function for output, the HTML will be separated from the logic! In this case the function is defined twice. A function contains only logic and values ​​are returned only as return. The second function will contain HTML, test logic, loops or hooks and outputs values ​​as echo. Ok, the…

  • Adding Custom Fields to WordPress User Profile

    Adding Custom Fields to WordPress User Profile

    The user profile of WordPress can be fairly easily adapted to add your own values​​. So you can add the necessary fields according to your requirements. Here is how you do it, we add a field for the address and the content will be stored in the database. Various hooks in WordPress make sure that…