WordPress.org

Support

Support » Requests and Feedback » wp_list_cats bug

wp_list_cats bug

  • After upgrading I wasn’t able to set a file variable in wp_list_cats()
    I walked throug the code and changed this:

    function get_category_link($echo = false, $category_id, $category_nicename, $file = "") {
    global $wpdb, $tablecategories, $post, $querystring_start, $querystring_equal, $cache_categories;
    $cat_ID = $category_id;
    $permalink_structure = get_settings('permalink_structure');
    if ('' == $permalink_structure) {
    if($file == ""){
    $file = get_settings('home') . '/' . get_settings('blogfilename');
    }else{
    $file = get_settings('home') . '/' . $file;
    }

Viewing 10 replies - 1 through 10 (of 10 total)
  • Where do I paste this code to make it work?

    function get_category_link

    wp-includes/template-functions-category.php

    I tried this fix, but I’m still not able to set a file variable in wp_list_cats. It uses index.php and not the archive.php I set it to use. Am I missing something?

    I guess I’m having the same problem: My parent categories are not displayed although they used to be, and although I’ve tried the Wiki options for wp_list_cats… any remedy for that?

    <?php wp_list_cats(‘hierarchical=1&optionall=1&sort_column=name&optioncount=1’); ?>
    in my theme’s index.php just produces an unsorted list without parent names and links…

    Another silly question: how can I reduce the space between my link group headings and the link group? – Thanks ever so much!

    http://www.matthiasheil.de/wordpress/

    thanks Kafkaesqui

    I tried, but it doesnt work. Any guess?

    Don’t know what I did, but sudenly it works. Thanks all

    I’m using <?php wp_list_cats(‘sort_column=name&optioncount=1&children=0’); ?>

    and all it’s producing is an unsorted list… Any thoughts? I hate the fact that we sort categories by ID# by default, how dumb is that?

    “I hate the fact that we sort categories by ID# by default, how dumb is that?”

    Since that’s exactly how I want to sort them, it’s not dumb to me.

    Anyway, if you’re using 1.5:
    http://wordpress.org/support/topic.php?id=11766#post-138417

    to get an ordered list you need to use the following:
    <?php wp_list_cats(‘sort_column=name&hide_empty=0’); ?>

    previously the hide_empty arg wasn’t necessary.

    Amazing how many people told me that I need to use ‘sort_column=name’…. Amazing also how many people didn’t read the rest of the entry saying those of us with this problem were already using that. Duh.

    Kafkaesqui – Thanks for the file fix…. I still don’t understand why WordPress sorts by ID# by default, I would think *most* bloggers would want to sort by name, or number of entries or something other than ID#…. which is why I said I thought that was dumb.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘wp_list_cats bug’ is closed to new replies.