WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] PHP command within another PHP command (3 posts)

  1. scottwallick
    Member
    Posted 8 years ago #

    I have a php-related quesiton. Basically, I have a theme I would like to release, but part of that theme requires a feed icon for the category list. My code is

    <h2>Category Archives</h2>
    <ul>
    <?php wp_list_cats('sort_column=name&optioncount=1&feed=(RSS)&feed_image=http://www.blog.com/wp-content/themes/plaintxtCMS/feed.png&hierarchical=1'); ?>
    </ul>

    I'd like to have a php command within there so that I didn't have to tell folks who are downloading the theme to change the directory (it's used more than a couple times).

    I'm familiar with <?php bloginfo('stylesheet_url'); ?> but I just don't have the php knowledge to know how to include it with the command above. Ideally I'd like <?php bloginfo('stylesheet_url'); ?>/feed.png to be used, but (of course) get errors with I just throw it into the wp_list_cats tag (above).

    Help? Would be appreciated.

    -scott

  2. davidchait
    Member
    Posted 8 years ago #

    ...&feed_image='.get_bloginfo('stylesheet_url').'/feed.png&...

    soemthing like that. though, you might want 'template_url' actually... play around til you find the right bloginfo. ;)

    -d

  3. scottwallick
    Member
    Posted 8 years ago #

    David,

    Thanks for your quick response and perfect answer. So I just learned something I'd been wanting to use for some time now. Cheers. Also, I went with 'template_url' as suggested. Worked great. Appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags