Comentarii in tema wordpress
In tutorialul trecut v-am explicat cateva reguli de baza pentru a construi un sidebar.php, acum am sa va explic cat de usor se pot realiza comentariile pentru o tema wordpress.
Nu are rost sa va copiez tot codul din comments.php si comments-popup.php a temei default. V-as sfatui sa deschideti respectivele file-uri si sa faceti pe ele modificarile dorite. Intai cele legate de css si dupa aceea cele strict de funtionare.
V. Schimbari pentru comments.php
Schimbari de bun simt la textul afisat in comments.php:
-
<p class="nocomments">This post is password protected. Enter the password to view comments.</p> <em>Your comment is awaiting moderation.</em>-
<p class="nocomments">Comments are closed.</p> -
<h3 id="respond">Leave a Reply</h3> -
<p>Logged in as <a href="<?..... -
<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout » </a>
In file-ul comments-popup.php puteti schimba textul inurmatoarele linii:
<title><?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?></title>-
<h2 id="comments">Comments</h2>
<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p> -
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p> - &
lt;h2>Leave a comment</h2>
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p> <p>No comments yet.</p>p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.-
<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout » </a></p> -
Sorry, the comment form is closed at this time.
Inlocuiti ce textul pe care vi l-am evidentiat aici cu ce doriti voi, daca este un blogin limba romana puteti schimba textul in limba romana de genul: Acest articol este parolat. Pentru a vedea comentariile aveti nevoie de parola. Texul poate fi schimbat si la form unde apare label, de exemplu: aveti <small>Name <?php if ($req) echo "(required) si poate fi inlocuit cu <small>Nume<?php if ($req) echo "(required).. Daca intampinati probleme in gasireal textelor respective in file-uri, cu fisierul deschis folositi comanda CTRL+F si copiati textul si apoi find.
Codul CSS trebuie modificat cel mai mult aici asa ca dati atentie mai mult fisierului css. In rest nu ramane decat sa implementati dupa ce terminati tema plugin-uri pentru comments. Pluginurile legate de Gravatars sunt cele mai folosite si foarte folositor mi se pare plugin-ul Subscribe to Comments .


[...] comments.php [...]