WordPress.org

Ready to get started?Download WordPress

Forums

How do I write this IF statement? (2 posts)

  1. thelastknight
    Member
    Posted 5 years ago #

    I tried this

    <li<?php if ($comment->comment_author_email == "myemail@example.com") { ?> class="authorcomment"<?php } ?>>

    Which works, but obviously that is a defined email. So I thought just change it to this.

    <li<?php if ($comment->comment_author_email == the_author_email) { ?> class="authorcomment"<?php } ?>>

    But nothing?

  2. Qliphoth
    Member
    Posted 5 years ago #

    If you try the_author_email() maybe?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.