Hi there,
I am really in a hole here and I don't think I am going to be very good at explaining 🙂
This is my current code:
<ul class="comments">
<?php foreach ($comments as $comment) : ?>
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>" <?php my_comment(); ?>>
<p class="comments">On
<?php
comment_time("F ");
echo nthnum(comment_time("j", false));
comment_time(" Y @ g:i A");
?>,
<?php comment_author_link() ?> said:</p>
<?php if ($comment->comment_approved == '0') : ?>
<p><em>Your comment is awaiting moderation.</em></p>
<?php endif; ?>
<?php comment_text() ?>
<p><?php edit_comment_link(__("Edit This")); ?></p>
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>
<?php endforeach; /* end for each comment */ ?>
</ul>
I need to allow this:
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>
to replace the 'alt' with 'mycomments' that is usded in the function below.
<?php
function my_comment() {
global $comment;
$your_url = 'http://mydomain.com/'; // Write your url here
$your_name = 'John Doe'; // Write your name here
$the_name = apply_filters('comment_author', $comment->comment_author);
$the_url = apply_filters('comment_url', $comment->comment_author_url);
if (($the_name == $your_name) && ($the_url == $your_url)) {
echo "class='mycomments'"; // The class to be defined in your stylesheet
}
}
?>
But to be absolutely frank. I don't have a clue.
Can anyone assist?
Thanks