WordPress.org

Ready to get started?Download WordPress

Forums

Making Themes compatible for 2.0.x and 2.1.x at same Time (5 posts)

  1. Vladimir Simovic
    Member
    Posted 7 years ago #

    Hi,

    is it possible to make the same Theme comatible for 2.0.x and 2.1.x with one version? I think about something like a Loop in a file:

    if wp 2.0.x {... code for blogroll}
    if wp 2.1.x {... code for blogroll}

    because its pain in the neck to make for every theme two versions (one for wp 2.0 and one for 2.1).

    greetings

  2. Vladimir Simovic
    Member
    Posted 7 years ago #

    Thx for so many answers :-). But i found the solution:

    '<?php if (($wp_version < "2.1")) {
    wp_list_cats('sort_column=name&optioncount=1');
    }
    if (($wp_version >= "2.1")) {
    wp_list_categories('sort_column=name&show_count=1&title_li');
    } ?>'

  3. Doodlebee
    Member
    Posted 7 years ago #

    ooo..cool! Good idea :)

  4. drmike
    Member
    Posted 7 years ago #

    First time I've seen this thread.

    Probably could use the function call if_function_exists('function_name') as well. I think that's it.

  5. Vladimir Simovic
    Member
    Posted 7 years ago #

    @drmike,

    thank you for the answer. it works.

Topic Closed

This topic has been closed to new replies.

About this Topic