Forums
Home / Fixing WordPress / Trying to customize the comments made by the author
(@envec)
16 years, 12 months ago
I am trying to customize the comments I leave on my own blog, by calling a special division if the email left is my own, otherwise it calls the normal division. Here is the code I am using:
<?php if($comment->comment_author_email == ‘myemail@mydomain.com’){ ?> <div class=”blogauthor”> <?php } else { ?> <div class=”normalcomment”> <?php } ?>
However when i implement it I get an error on the comments saying:
“an unexpected @ was found on the comment function”
The error is obviously coming from the @ on the email I inserted.
How can I solve this?
(@epicalex)
try using ” ” around the email address
thats a guess by the way!
alternatively try Author Highlight
dont think its the “” marks. thanks anyway I will check the plugin
(@envec)
16 years, 12 months ago
I am trying to customize the comments I leave on my own blog, by calling a special division if the email left is my own, otherwise it calls the normal division. Here is the code I am using:
<?php
if($comment->comment_author_email == ‘myemail@mydomain.com’){ ?>
<div class=”blogauthor”>
<?php } else { ?>
<div class=”normalcomment”>
<?php } ?>
However when i implement it I get an error on the comments saying:
“an unexpected @ was found on the comment function”
The error is obviously coming from the @ on the email I inserted.
How can I solve this?