Wsparcie » Motywy » Wyróżnienie komentarzy administratora

  • Witam. Jak mogę wyróżnić wszystkie komentarze dodawane przez administratorów? Choćby ikonką przy komentarzu lub innym kolorem.

    Proszę o odpowiedź.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Czix

    (@czix)

    W tym artykule może i jest to opisane, ale dla starszych wersji WP.
    Co jeśli posiadam aktualną?

    Jest to opis również dla tych najnowszych wersji. Wklej tu zawartość pliku comments.php, coś poradzimy.

    Thread Starter Czix

    (@czix)

    <div id="comments">
    
    					<?
    
    						if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    
    							die ('Prosimy nie załadowywać tej strony bezpośrednio.');
    
    						if(function_exists('post_password_required'))
    
    						{
    
    							if (post_password_required()) {
    
    								_e('<p class="notice">Ten post jest chroniony hasłem. Podaj hasło, aby zobaczyć komentarze.</p>');
    
    								return;
    
    							}
    
    						}
    
    						else
    
    						{
    
    							if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password)
    
    							{
    
    								_e('<p class="notice">This post is password protected. Enter the password to view comments.</p>');
    
    								return;
    
    							}
    
    						}
    
    					?>
    
    					<?php if ( have_comments() ) : ?>
    
    					<ol class="commentlist clearfix">
    
    						<h2><?php comments_number(__('Brak komentarzy'), __('Komentarze (1)'), __('Komentarze (%)')); ?></h2>
    
    						<div class="paging">
    
    							<div class="prev"><?php previous_comments_link() ?></div> 
    
    							<div class="next"><?php next_comments_link() ?></div>
    
    						</div>
    
    						<? wp_list_comments('avatar_size=75'); ?>
    
    					</ol>
    
    					<div class="paging">
    
    						<div class="prev"><?php previous_comments_link() ?></div> 
    
    						<div class="next"><?php next_comments_link() ?></div>
    
    					</div>
    
    					<?php else : // this is displayed if there are no comments so far ?>
    
    						<?php if ('open' == $post->comment_status) : ?>
    
    						<!-- If comments are open, but there are no comments. -->
    
    						<p class="notice">Brak komentarzy</p>
    
    						<?php else : // comments are closed ?>
    
    						<!-- If comments are closed. -->
    
    						<p class="notice">Komentarze wyłączone.</p>
    
    						<?php endif; ?>
    
    					<?php endif; ?>
    
    					<?php if ('open' == $post->comment_status) : ?>
    
    					<div id="respond" class="clearfix">
    
    						<h2>Napisz komentarz</h2>
    
    						<div class="cancel-comment-reply">
    
    							<small><?php cancel_comment_reply_link(); ?></small>
    
    						</div>
    
    						<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    
    						<p class="notice">Musisz się <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">zalogować</a>, aby skomentować wpis.</p>
    
    						<?php else : ?>
    
    						<form action="/wp-comments-post.php" method="post" class="form clearfix">
    
    							<?php if ( $user_ID ) : ?>
    
    							<p>
    
    								Zalogowany jako <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Wyloguj się z tego konta">Wyloguj &raquo;</a>
    
    							</p>
    
    							<?php else : ?>
    
    							<p>
    
    								<label for="author">Imię <small>(Wymagane)</small></label>
    
    								<input type="text" name="author" id="author" value="<?php if($comment_author) : echo $comment_author; else: echo 'Twoje imię lub nick'; endif; ?>" tabindex="1" class="tf" />
    
    							</p>
    
    							<p>
    
    								<label for="email">E-mail <small>(Wymagane, nie wyświetlane)</small></label>
    
    								<input type="text" name="email" id="email" value="<?php if($comment_author_email) : echo $comment_author_email; else: echo 'Twój adres e-mail'; endif; ?>" tabindex="2" class="tf" />
    
    							</p>
    
    							<p>
    
    								<label for="url">Strona internetowa</label>
    
    								<input type="text" name="url" id="url" value="<?php if($comment_author_url) : echo $comment_author_url; else: echo 'Twoja strona internetowa'; endif; ?>" tabindex="3" class="tf" />
    
    							</p>
    
    							<?php endif; ?>
    
    							<p>
    
    								<label for="comment">Treść komentarza:</label>
    
    								<textarea name="comment" id="comment" rows="10" cols="10" tabindex="4" class="tf"></textarea>
    
    							</p>
    
    							<p>
    
    								<label for="submit">&nbsp;</label>
    
    								<input name="submit" type="submit" id="submit" tabindex="5" class="submit" value="Dodaj komentarz" />
    
    								<?php comment_id_fields(); ?>
    
    							</p>
    
    							<?php do_action('comment_form', $post->ID); ?>
    
    						</form>
    
    						<?php endif; // If registration required and not logged in ?>
    
    					</div>
    
    					<?php endif; ?>
    
    				</div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Temat ‘Wyróżnienie komentarzy administratora’ jest zamknięty na nowe odpowiedzi.