• Mark

    (@encryptdesigns)


    I am curious on how I would add a custom variable to the end of my permalinked Category listing. I’m not sure which file I would have to edit and thought I’d look to my comrades here for support.

    I just want to pass a $referralcode variable to my category links. Does anyone know where I’d be able to do this? I was hoping to be able to do that with this string:

    <?php wp_list_categories(‘show_count=1&title_li=<h2>Categories</h2>’); ?>

    That way I wouldn’t have to edit the loop or anything. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You might be better off using get_categories and constructing your own category list via a foreach loop.

    Thread Starter Mark

    (@encryptdesigns)

    Thanks esmi, but I ended up writing an array and manipulating the Folding List Category plugin to do what I needed ?? Your idea sounds good but I think I may have more control over not erasing my work in a plugin than in the loop since updates for WP seemingly occur more frequently than that of plugins ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Concatenate string to wp_list_categories’ is closed to new replies.