Skip navigation

WordPress 2.1: Template Tag and Function Changes

I’m just beginning to dig into some of the template tag and function changes in WordPress 2.1, as are many volunteers covering the and . Here is a DRAFT list of some of the template tag and function changes I’ve found in WordPress 2.1. If you know of any others or have more supporting information, please let me know.

You can keep up with these changes and improvements on the , the online manual for WordPress Users, Template Tags and Function Reference, and also check WordPress Hooks from Flat Earth for updated information on hooks used in WordPress Plugins.

While some of these are still backwards compatible, consider changing them in your WordPress Themes, or check with your WordPress Theme author to see if they’ve released a new updated version.

Overall, the biggest changes which may impact you are the changes to how post categories are structured and the blogroll.

WordPress has played with a variety of names for the blogroll management. Originally it was Links Manager, then, for a very brief time, it was Bookmarks. Now, it is known as the Blogroll. It works basically the same except that your blogroll categories are now combined with post categories. It makes sense to some as your blogroll categories “should” be a reflection of your post categories, but not always.

So while the feature is now called Blogroll, the template tags use the term “bookmark” to designate blogroll link data. I know. It’s confusing. I’ll be writing more about this soon.

WordPress Theme and Plugin Authors Template Tag and Function Changes

The following are some of the template tags and function changes of specific interest to WordPress Theme and Plugin Authors. While some of these are new, others are are deprecated though still backwards compatible. It is highly recommended that you update your WordPress Themes and Plugins.

If the documentation isn’t listed in the WordPress Codex yet, read through the /wp-includes/deprecated.php file in the latest for specifics on parameters and actions.

  • get_post replaces get_postdata
  • get_linksbyname (new): Gets the links associated with category cat_name.
  • get_linkz replaces get_linkFUNCTION (various functions replaced by one)
  • get_options will replace get_settings
  • the_search_query may replace wp_specialchars
  • language_attributes (new): adds language attributes to HTML head tag
  • current_user_can replaces user_can_FUNCTION (various functions replaced by one)
  • get_the_category_by_ID replaces the_category_ID

This is a very rough draft and volunteers are working overtime to ensure information is updated and available as fast as possible. I’ll be updating it as I find more information.

Related Articles

Site Search Tags: , , , , , , , , , , ,
Copyright Lorelle VanFossen, member of the 9Rules Network

Member of the 9Rules Blogging Network


  1. Posted January 26, 2007 at 10:10 am | Permalink

    What are the bookmarks list? Never heard of those.

  2. Posted January 26, 2007 at 10:35 am | Permalink

    Bookmarks are just a fancy name for external links.

  3. Posted January 26, 2007 at 11:28 am | Permalink

    Bookmarks replace what used to be the “Links” section. This is necessary as the Links groupings and Categories have actually been integrated into one sort of thing, so now Links are called Bookmarks to denote this change.

    “Links” are deprecated, all around.

  4. pulling out my hair
    Posted January 26, 2007 at 12:30 pm | Permalink

    The list of changes as well as advice for how to change customized templates should have been done BEFORE people were told to update to the new version.

    This sounds like a case of Ready. Fire. Aim.

  5. Posted January 26, 2007 at 3:00 pm | Permalink

    Yeah, I am very confused by the Bookmarks, Blogroll, Categories setup… I don’t like it at all and it’s very confusing. I really don’t like them combined. It changed the ID numbers of the link categories and they were all messed up. It took me an hour just to fix ONE category.

    Hope you post about that new “feature” soon… Are there any ups to it??

    So far I don’t like WordPress 2.1

  6. Posted January 27, 2007 at 1:47 am | Permalink

    I’m really not a fan of the new “Blogroll” tab – just the name, not the functionality.

    “Blogroll” makes WP too blog-centric. It’s a blog tool I know, but it’s also often used as a CMS. Just about all of my sites are built with WP, and I have never marketed it as a blog tool to my clients because I didn’t want to confuse them.

    I’d really like the ability to easily customise all of the labels and text in the admin in order to tailor WP as a CMS when necessary.

  7. Posted January 27, 2007 at 5:54 am | Permalink

    Do you see “Blogroll” anywhere on this blog? I don’t like that title either. I use “Displays Brillance”. Don’t like the title of the set of links, change it.

    Changes in template tags don’t take away anything from the CMS capabilities of WordPress. You can do ANYTHING with your Blogroll/Bookmarks/Links list. On this blog, I have it stuffed with Hot WordPress Articles, directing people to posts on this site most commonly needed for WordPress users. You can put pictures in your blogroll or not use it at all.

    That’s the magic of WordPress. All the versatility.

    By “labels”, I assume you meant the titles of the various sections in a sidebar, not the bad usage of “labels” to mean categories that Google uses.

  8. Posted January 27, 2007 at 2:36 pm | Permalink

    Hey everyone,

    Is there any way NOT to have your link categories combined with your post categories. Right now, my blog just shows my post categories. None of the links in my sidebar show, nor do the link categories show either. Does anyone know how I can fix this?


  9. Posted January 27, 2007 at 2:43 pm | Permalink

    Unless someone comes up with a Plugin, there is now no way to get blogroll link categories out of your post categories. Personally, I hate it, but for some it makes sense. Your blogroll link categories, should in theory, match your post categories, right? Hmmm.

    If you do not have any posts in those categories, they will not show on your category list on your blog.

    As for the links not showing, you will have to edit your sidebar.php template file and change the wp_list_cats template tag to the new one wp_list_categories as described in the article and Fear Not WordPress 2.1 and WordPress Plugins.

    If that’s uncomfortable for you, contact your WordPress Theme author for an updated version.

  10. Posted January 27, 2007 at 3:58 pm | Permalink

    I appreciate your prompt response, Lorelle.

    I just tried editing my theme’s sidebar.php file, but ever since the upgrade, it’s saying the file in unwriteable. I tried CHMOD-ing the settings on my server but nothing is happening.

    Any suggestions?


  11. Posted January 27, 2007 at 5:22 pm | Permalink

    The folder might need to be writable, too.

    Find a copy on your computer, make the changes, then upload the new file.

    I rarely ever use the built-in editor. I edit the changes on my computer and upload them. Make sure you clear the cache on your browser to see the changes.

  12. Posted January 28, 2007 at 5:11 am | Permalink

    The theme I use is Sharepoint Like, and the header, footer and sidebar code is all included in the main template.

    I haven’t upgraded to 2.1 yet, but is this the time I should think about splitting the code into separate files? I’ve only been using WP for a month, so I don’t want to take on anything that’s going to cause a zillion problems.

    I’m finding the blogroll/post cats stuff confusing too – I thought a blogroll was something like a favourites or recommended reading list.

  13. Posted January 28, 2007 at 8:42 am | Permalink

    Yes, please write more about “blogroll” – Mine is not working at all right now (with the K2 template).

    Thanks for a very informative site by the way!


  14. Posted January 29, 2007 at 6:26 am | Permalink

    “Unless someone comes up with a Plugin, there is now no way to get blogroll link categories out of your post categories. Personally, I hate it, but for some it makes sense. Your blogroll link categories, should in theory, match your post categories, right?”

    I appreciate you clarifying this, Lorelle. In all the buzz about the new release, this is the thing I’ve been wanting to hear about the most. Unfortunately, the “blogroll” changes in 2.1 just don’t make a bit of sense to me.

    I’ve been using “Links” to manage both internal and external links, and this change completely blows that strategy out of the water. The new model is great for someone that wants an asides-style mini-blog, but it’s way to inflexible for everyone else. I’m disappointed in the WordPress team for putting this powerful feature in a straitjacket.

  15. Posted January 29, 2007 at 7:09 am | Permalink

    Adam, I know this is frustrating, but I’ve been working with this bothersome thing for months on, so I’m not understanding your issue with it. I have internal and external links in my “blogroll”. The only obnoxious issue is that my very carefully constructed and narrow category list now has link categories included in the Write Post panel, making me scroll farther up and down with more categories in the list. Otherwise, everything works basically the same.

    How does this mess up your sidebar links?

  16. Posted January 29, 2007 at 8:12 am | Permalink

    I haven’t yet had time to do a test installation of 2.1, and some further research has revealed that my worries may be unfounded. Since posting my earlier comment, I’ve gone through Codex and found that:

    1) The new wp_list_categories can be used to exclude link categories from my category archive page (which is only intended to point to archived posts).
    2) The new wp_list_bookmarks can be made to work much like the wp_get_linksbyname tag that I’m currently using.

    It looks like some template updates may get me squared away. As with all significant upgrades, I’ll be testing this out on my dev machine first. Here’s hoping for a smooth transition. 🙂

    Thanks again for the info, and for all the time you put into this site. It’s a great resource.

  17. Posted January 31, 2007 at 1:12 pm | Permalink

    Hi Lorelle

    I have i.e. linkcats for single articles, because every week >20 webmaster would like to be a “linkpartner” of,

    Now there are ~18 normal categories and over 45 linkcats. I’m sure you understand that this and the new “blogroll-what-ever” mess up my sidebar.;)

    It was a beautiful chaos as I install a testblog with the backup from;)
    This is the one side the other I have personally-neogiated contracts with my linkpartner. And I’m not alone with this problem.

    If I can’t find any solution for the linkcats I have to change the software. Because contracts are contracts. And I wouldn’t like to spend hours of hours to organize linkcats in the administration panel.

    Thanks a lot for your work for all the time you’ve spent with this site and I’m sure you are a very friendly woman.

  18. Posted January 31, 2007 at 1:27 pm | Permalink

    If you think I’m friendly, you’ve been listening to the wrong people. 😉

    I’m trying to understand. Your links and link categories are now messed upon on your sidebar blogroll/link list. Then replace the wp_list_cats() with wp_list_categories() in your WordPress Theme template file, which might be sidebar.php and see if that fixes it. If not, check in the WordPress Support Forums for a better explanation. I will have one here soon, but not soon enough for you.

    Or, look for a new WordPress Theme that has been updated to work with WordPress 2.1 from the WordPress 2.1 Theme Compatibility List. That will fix your problem quickly until you can fix your WordPress Theme yourself.

  19. Posted January 31, 2007 at 2:27 pm | Permalink

    Hi Lorelle 😉

    thanks a lot for repairing my last comment 😉

    I know the new template tags and I know how to use it, because tomorrow I publish an article on about the new *blogroll* and about the new way to organize links in WP2.1.

    I have to know it (or I would like to know it 😉 ) because I’m member of the team.

    But it is so complicated now.


    Linkcategories are for links and not for my articles and vice versa.

    Maybe I’m conservative but I love a logical structure.

    In my kitchen there is one drawer for my cutlery and one for my wooden spoon and so on.

    That is a logical structure. WP2.1 looks like a kitchen with one drawer for all. 😉

    Have a nice day and I’m sure I asked the right person to find out that you are friendly. Because I ask my heart and I read between the lines in your blog. 😉


  20. Posted January 31, 2007 at 4:12 pm | Permalink

    I understand your problem. I hate the combination, but even though I complained A LOT, there is nothing I can do to change this. Link categories are now combined with post categories. In theory, this makes sense. You would want your links to reflect the content within your posts. I find it annoying and distracting as most people don’t match link lists with post categories, but that’s it.

    The replace template tags are listed in the article above, with links to the WordPress Codex information. Right now, that’s the best I can point you to until next week. I’ll have an article out by the end of next week with step by step instructions. I’m in the middle of moving right now. Sorry.

    Do check the MANY explanations on how to do this in the WordPress Support Forums, too. And complain loudly there, too. 😉

  21. Posted February 3, 2007 at 2:58 pm | Permalink

    Lorelle, one quick note. get_settings is replaced by get_option, not get_options.

  22. Guillermo
    Posted February 7, 2007 at 9:13 am | Permalink

    Sorry, but, don’t you have this backwards ‘get_postdata replaces get_post’? Deprecated.php has:

    // Deprecated. Use get_post().
    function get_postdata($postid)

  23. Posted February 7, 2007 at 12:20 pm | Permalink

    Opps! Thanks for the catch.

  24. Posted February 8, 2007 at 5:42 pm | Permalink

    My links and blog posts are not in the same categories. So that means that when I want to list only post categories or only link categories I have to use a tag that allows for either an exclusive or inclusive list. That wouldn’t be an issue if I never added a category. But now, every time I add a new category I have to tweak my theme. Since I don’t like to modify my theme live, that means that I can’t add a category if I’m away from home. I liked the ability to spontaneously add a category if I needed to or wanted to. Now it takes a lot more careful consideration and planning.

    It seems to me that say that post and link categories should be the same is very restrictive. While my site is a blog, I also have a lot of static pages and both internal and external links that I’m managing. This new direction seems to me to be more “bloglike” and less “CMS”.

  25. Pace
    Posted February 9, 2007 at 6:48 am | Permalink

    Is there any way to get the links sorted by name length like pre 2.1?

  26. Posted February 9, 2007 at 7:40 am | Permalink

    I’m working on a two major upgrades right now, so I’ll have more specifics, but I believe it says in the wp_list_bookmarks WordPress Codex to use the old orderby=name. Double check to make sure. It should work.

  27. Pace
    Posted February 9, 2007 at 3:40 pm | Permalink


  28. Posted June 11, 2008 at 2:11 pm | Permalink

    Anybody know how to change the words NO COMMENT to WRITE NEW COMMENT on a word press blog/

    Please help….

  29. Posted June 11, 2008 at 3:55 pm | Permalink

    @ Andrea Froncillo:

    The words within the comments.php template file are featured in this Default Theme Comments example, showcasing the elements you need to change to change the wording for comments. In the future, please check the WordPress Support Forums and WordPress Codex, the online manual for WordPress Users, for help as they provide the most extensive support for such issues.

    And never share your email address within the comment box (only in the form that is never shown on the public page) to protect your privacy.

37 Trackbacks/Pingbacks

  1. […] Lorelle klärt uns auf – unbedingt Lesen – WordPress 2.1: Template Tag and Function Changes […]

  2. […] WordPress 2.1: Template Tag and Function Changes « Lorelle on WordPress While some of these are still backwards compatible, consider changing them in your WordPress Themes, or check with your WordPress Theme author to see if they’ve released a new updated version. […]

  3. Funciones que cambiaron en WordPress 2.1

    Si usas WordPress 2.1 y estás teniendo problemas en tu theme debido a que los links no se ven, etc, aquí te damos la lista de las funciones que cambiaron…

  4. […] WordPress 2.1 Template Tags – Änderungen Lorelle on WordPress listet im Artikel Template Tag and Function Changes die wichtigsten Template-Tags, die sich mit WordPress 2.1 geändert […]

  5. […] I also discovered there’s going to be a lot of changes for WordPress Template Tags and other functions. I’ll have to snoop around those, […]

  6. […] WordPress 2.1: Template Tag and Function Changes […]

  7. […] I must remember to check my tags to see that they are not depricated […]

  8. […] Lorelle has a list of template and function differences between WP2.0.x and WP2.1. They are quite substantial. […]

  9. […] Einige (alle?) Änderungen an Funktionen und Variablen hat Lorelle on WordPress […]

  10. […] Via Lorelle. […]

  11. […] more research, as the upgrade involved quite a few fundamental changes to the back end, including template tags and other gotchas. So, I’ve spent most of last night and this morning making several […]

  12. […] state in several of the previous major and minor WordPress releases. Lorelle has written a draft list of the changes in functions in the latest WP release. This is a very interesting read, especially […]

  13. […] menyunting WordPress Theme,  bisa masuk di sini. Atau di sini untuk mengecek kompatibilitas WordPress […]

  14. […] WordPress 2.1: Template Tags and Function Changes by Lorelle… If you know anything about code, you might want to take a look at some of the changes you might need to make the adjustment to 2.1. […]

  15. […] WordPress with version 2.1 now have some changed tags and functions I’m going to go with a WP 2.1 compatible theme for a while since I need to clean up my own […]

  16. […] an Template Tags und Funktionen in WP 2.1 Bin gerade auf einen Artikel bei Lorelle gestossen, der auflistet, was an Funktionen in WordPress 2.1 alles verändert wurde. […]

  17. […] Tras la actualización de ayer, la migración del servidor de Hostalia a Dreamhost (enlace referenciado) por diversos motivos y los pequeños problemas que tuve después con algunas de las etiquetas del código de WordPress, creo que lo más interesante será que haga una pequeña lista, apoyándome con la entrada de Lorelle. […]

  18. […] No fue hasta unos das despus que Lorelle public la lista de cambios en estos tags y pude seguir el hilo de esta nueva configuracin (que an no me ofrece los […]

  19. […] in WordPress 2.1 bei Template Tags und Funktionen (mit Verweis auf Lorelle) (tags: wordpress version […]

  20. […] WordPress 2.1: Template Tag and Function Changes « Lorelle on WordPress (tags: wordpress wp2.1 Template tag blog function webdesign lorelle) […]

  21. […] many WordPress Theme designers were caught off guard with changes to the WordPress template tags for categories and blogroll/bookmarks. Most of these are simple fixes, replacing the old template […]

  22. […] WordPress 2.1 Changes La lista completa de los cambios que se hicieron en esta útlima versión de WordPress, muy útil si desean actualizar si WP, sería bueno que pensaran en actualizar también su plantilla. These icons link to social bookmarking sites where readers can share and discover new web pages. […]

  23. […] WordPress 2.1 Theme Compatibility List WordPress 2.1: Template Tag and Function Changes Fear Not WordPress 2.1 and WordPress […]

  24. […] switch to it in one click (but you need to redo all your customizations). You can read more about Template Tag and Function Changes in WordPress […]

  25. […] Lorelle on WordPress (of course) […]

  26. […] en los tags para los templates, aquí tienen una lista de los mismos sacados de una gran fuente. Lorelle Template Tag and Function […]

  27. […] D’autres changement dans les marqueurs de thème sont résumés par Lorelle. […]

  28. […] switch to it in one click (but you need to redo all your customizations). You can read more about Template Tag and Function Changes in WordPress […]

  29. […] For more new versus old functions, read Lorelle’s Template Tag and Function Changes. […]

  30. […] sich in WordPress einige Template-Tags geändert oder funktionieren nicht mehr richtig. Lorelle hat alle Änderungen zusammengefasst. Viele WordPress-Infos hab ich auch letztens auf entdeckt. Bookmark Diese Icons […]

  31. […] have time, I’ll redo some styling and design, mostly backgrounds. A good help for updating is Lorelle, QoT and […]

  32. […] kein aktuelles System verwendet, kann sein Theme (Design-Vorlagen) schon einmal aktualisieren. (Infos bei Lorelle – schon älter aber […]

  33. […] have time, I’ll redo some styling and design, mostly backgrounds. A good help for updating is Lorelle, QoT and […]

  34. […] upgrade bandwagon, take a moment to arm yourself with the latest information on what’s new, what’s changed and the ultimate question from my clients . […]

  35. […] WordPress 2.1: Template Tag and Function Changes […]

  36. […] WordPress 2.1: Template Tag and Function Changes […]

  37. […] For those willing to edit their own WordPress Themes, see WordPress 2.1: Template Tag and Function Changes. […]

Post a Comment

Required fields are marked *

%d bloggers like this: