A few codex instructions for 'joining' template tags

  1. Cathy Tibbles

    I LOVE the wordpress template tags. I can do all kinds of things that I never dreamed I could do. BUT the instructions on "get_attachment" and "get_avatar" aren't enough for a non-php'er like me. After hours of reading, a kind soul in the wordpress chat room helped me join get_avatar with the bloginfo('template_directory') tags. I call them tags, because I TRULY am a php novice. I think they are commands, or URIs or APIs or some other nonsense, and that I want to contatenatitate them or something. Just put 'em together. And in this case, I knew they had to be in single quotes. But how? What do you do if a parameter's value is supposed to come from another php template tag?

    Could you help us novices out with some of those template tags that you so graciously programmed/wrote/ entered/ scribed?

    This was my solution, eventually:

    { $template_dir = bloginfo('template_directory');
    echo get_avatar(get_comment_author_email(), '64',
    $template_dir .'/images/no_avatar.jpg');

    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    1 Vote
  • Status

    This is not a core suggestion