• I posted the code into my sidebar to show how many spams have been caught by Akismet but for some reason, the code shows up in a white color so isn’t visible against the white background. There is no class defined …….

    So, I guess I need to define a class. I’m not great at CSS. Can someone please guide me?

    Would it be as simple as
    }
    .spam
    { margin: 8px; padding: 8px; border: solid 1px #FF0000; background: #FFCCFF; font-size:90%; color: black
    }

    <div class=”spam”><?php akismet_counter(); ?><div>

Viewing 7 replies - 1 through 7 (of 7 total)
  • You could check if there is any kind of class/whatever around it – http://codex.wordpress.org/Finding_Your_CSS_Styles
    and if there is nothing, then yes, something like above should work.

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    I tried what I posted above with modifications but it didn’t work

    .spam
    font-family: Arial, Sans-Serif;
    font-size: 1em;
    text-decoration:none;
    font-style: bold;
    color:#FF0033;
    }

    (Told you I’m not good with CSS)

    🙂

    The code above is missing an opening { after .spam

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    .spam {
    font-family: Arial, Sans-Serif;
    font-size: 1em;
    text-decoration:none;
    font-style: bold;
    color:#FF0033;
    }

    Still shows as white

    I have no idea what’s the output of that code – so I can’t say anything more unless I see it.

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    Do you have Akismet enabled on your site? The new 2.1 instructions tell you to add this — To show off your Akismet stats just put <?php akismet_counter(); ?> in your template

    So, in my sidebar I have that with a div tag=spam before it …

    (I know the fix is easier than downgrading!)

    Yes, <?php akismet_counter(); ?> does publish the amount of spam-comments caught in white text, though it should be readable on any background-color since it uses the image located in wp-content/plugins/akismet/akismet.gif as a background.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘New Akismet in Version 2.1’ is closed to new replies.