Support » Fixing WordPress » get_avater $default

  • <?php echo get_avatar($id_or_email, 50, $default_avatar ); ?>

    Three questions:

    1. According to the codex, to change the default avatar I would use $default = ‘<path_to_url>’ as the last parameter. How do I make a relative call to an image inside <?php ?>. I’d like to do it similarly to how I call images –

    <img src="<?php bloginfo('stylesheet_directory'); ?>/img/someimage.jpg" alt="alt text here" />

    2. How can I add alt text using the get_avatar function?

    3. How can I link the gravatar image?

    Thanks for any help you can provide.

    Thank you,

    Joe

Viewing 1 replies (of 1 total)
  • 1. use get_bloginfo

    <img src="<?php get_bloginfo('stylesheet_directory'); ?>/img/someimage.jpg" alt="alt text here" />

    2. not sure, sorry

    3. just wrap the whole gravatar call in a link

    <a href="#" title="Link"><?php echo get_avatar($id_or_email, 50, $default_avatar ); ?></a>

    Hope that helps

    adam

Viewing 1 replies (of 1 total)
  • The topic ‘get_avater $default’ is closed to new replies.