Tag: PHP

  • Use WordPress Cron

    WordPress has its own cron to automatically and scheduled run certain themes. Therefore WordPress provides several functions to use the cron. In our first example we send every hour a mail with the help of the WordPress function wp_mail(). FYI, this is just a possibility, please don’t do it on your system! As default, WordPress…

  • Update RSS Language Value

    And today opens the 13th door of our Advent Calendar. You cannot only use a language key for your blog, but also for your feed:<language>en</language>. WordPress also has provided an option, but not easy to maintain. However, it is advisable to use the key according to the codec and therefore I show you some ways.

  • If Post is Older Than

    12th door of our Advent Calendar, we are half through! Sometimes you need a query that satisfies the requirement that the advertising is displayed only if the article has reached a certain age. Who does not want to rely on a Plugin, we recommend the following little solution.

  • 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:

  • 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 =…

  • Custom Fields in your Feed

    Since I work very often with custom fields and integrate various functions in my theme, I noticed something which I use extensively. I fill my feed exclusively with content from the custom fields.