Month: December 2009
-
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:
-
Manage Multiple Excerpt Lengths
Behind our 10th door of our Advent Calendar, we have a tip how to use multiple excerpt lengths. WordPress 2.9 allows you via filter to adjust excerpt more string and the length of the excerpt. But if you need several excerpt lengths for different templates, then what?
-
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.