• I’m using wp_list_categories and I’d like to show a feed image. I’m setting feed_image in the list of parameters but I want to pass in the variable for the Template URL.

    I’ve tried bloginfo(template_url) but that spits it out before the list items instead of embedding the value in the parameter list where I want it.

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Okay, what “Template URL” are you talking about? Could you be more clear? What are you trying to do? I’m not understanding your end goal here.

    Thread Starter nicjohnson

    (@nicjohnson)

    Dang, Otto, you’re quick. I came back 6 minutes later to say I’d figured it out and you’d already replied! Thanks!

    So, I wanted to get the template_url so I could use it to point to an image inside my theme. I was using bloginfo(template_url) to try to insert into a query parameter string when I should have been using get_bloginfo(template_url).

    So, the solution code is:

    wp_list_categories('title_li=&show_count=1&orderby=count&order=desc&feed_image='. get_bloginfo(template_url) .'/images/rss-icon.jpg');

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Passing the template_url into the wp_list_categories query string’ is closed to new replies.