Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WordPress template

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24906
    buckmajor
    Member

    Hi there newbie here.

    I only just start using wordpress and learning how to design my own theme from CSS Videos ‘Designing for WordPress’.
    P.S thanks a lot Chris Coyier your the man, there is so much info to gain from your site. But one video at a time :D .

    I have stumbled across a few errors on the third video of ‘Designing for WordPress’. I cant figure out why my gravatar is not working properly. By the way, I am using a virtual host ‘XAMPP’ for installing wordpress. I activated the gravatar plugin but it is not working.

    Here is the error:
    Error

    Quote:
    Fatal error: Call to undefined function gravatar() in C:Program Filesxampphtdocswordpresswp-contentthemesblankcomments.php on line 43

    PHP file: comments.php

    Quote:
    <img src="images/search.jpg" alt="" style="margin-top: -10px;" />

    <img src="<?php gravatar(‘R’, 125, ‘images/gravatar.jpg’); ?>" alt="Gravatar" class="floatleft" />

    Any suggestions what I’m doing wrong here?

    Many thanks in advance
    CHEERS :)

    #57957
    buckmajor
    Member

    Damn I must be the only one with this kind of error :shock:

    #57971

    I’m not sure where you got that code from so it’s difficult to say.

    As of WordPress 2.5 Gravatar support is built-in. The theme function for accessing gravatars is get_avatar(), which returns a complete <img> tag of the avatar.

    Prior to 2.5 support for Gravatar was provided by plugins, so the code you have may require you to install a plugin to work properly.

    #57967
    buckmajor
    Member
    "davesgonebananas" wrote:
    I’m not sure where you got that code from so it’s difficult to say.

    As of WordPress 2.5 Gravatar support is built-in. The theme function for accessing gravatars is get_avatar(), which returns a complete <img> tag of the avatar.

    Prior to 2.5 support for Gravatar was provided by plugins, so the code you have may require you to install a plugin to work properly.

    Hi dave,

    Thanks, I’m just happy someone replied back to me :D .

    I actually got this code from Chris Coyier’s video tutorial ‘Design for wordpress’ and followed everything until this minor hiccup.

    Are you able to show me a sample of that script and how it works? Like where do I put

    Quote:
    ‘The theme function for accessing gravatars is get_avatar()’

    code?

    #57966

    Ok, I have found the tutorial and downloaded the template. The template relies on an old plugin (Gravatar) which has been replaced by the built-in functionality in WordPress now (I think).

    You can update the template by replacing the line in comments.php:

    Code:
    ” alt=”Gravatar” class=”gravatar” />

    with

    And in style.css change:

    Code:
    .gravatar { margin-top: 3px; padding: 2px; height: 40px; }

    to

    Code:
    .avatar { margin-top: 3px; padding: 2px; height: 40px; }
    #57961
    buckmajor
    Member

    Oh my GOD, oh my GOD it worked Dave, it really worked..thank you thank you :D :D ;) .
    Now I understand why it didn’t work in the first place :roll: .

    I have the avatar in place now, so all I have to do is align the comment tip and bubble with the CSS. So hopefully no more dramas with this :mrgreen: .

    Thanks heaps Dave.
    CHEERS :)

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.