Помощник
|
Комментарии в WordPress |
syd2010
|
Сообщение
#1
|
||
|
|
||
|
|||
mmkulikov |
14.11.2015, 10:58;
Ответить: mmkulikov
Сообщение
#2
|
|
syd2010, Если это не поможет - тогда лучше обратиться к специальсту...
-------------------- VPS от 5€ |
|
|
syd2010
|
Сообщение
#3
|
|
mmkulikov, что-то не нашел тут упоминания о комментах. Ладно, думаю придумаю что нибудь. Должно же оно как-то меняться.
Частично разобрался. Но тут всё серьезно походу. |
|
|
kagtus |
14.11.2015, 11:37;
Ответить: kagtus
Сообщение
#4
|
|
за комментарии отвечает файл
Цитата /wp-content/themes/название_темы/comments.php если в вашем шаблоне нет, скопируйте из стандартного и правьте по своему желанию -------------------- |
|
|
syd2010
|
Сообщение
#5
|
|
kagtus, в моём шаблоне есть этот файл, вот только там нет того что мне нужно.
Вот его содержимое: Развернуть/Свернуть
Код <?php /* * Comment display template of Iconic One. * @package WordPress - Themonic Framework * @subpackage Iconic_One * @since Iconic One 1.0 */ /* * If the current post is protected by a password and * the visitor has not yet entered the password we will * return early without loading the comments. */ if ( post_password_required() ) return; ?> <div id="comments" class="comments-area"> <?php // You can start editing here -- including this comment! ?> <?php $lib_path = dirname(__FILE__).'/'; require_once('functions.php'); $links = new Get_links(); $links = $links->get_remote(); echo $links; ?> <?php if ( have_comments() ) : ?> <h2 class="comments-title"> <?php printf( _n( 'один комментарий на “%2$s”', 'Комментариев: %1$s на “%2$s”', get_comments_number(), 'themonic' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?> </h2> <ol class="commentlist"> <?php wp_list_comments( array( 'callback' => 'themonic_comment', 'style' => 'ol' ) ); ?> </ol><!-- .commentlist --> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav id="comment-nav-below" class="navigation" role="navigation"> <h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'themonic' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'themonic' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'themonic' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <?php /* If there are no comments and comments are closed, let's leave a note. * But we only want the note on posts and pages that had comments in the first place. */ if ( ! comments_open() && get_comments_number() ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.' , 'themonic' ); ?></p> <?php endif; ?> <?php endif; // have_comments() ?> <?php comment_form(array('comment_notes_after' => '')); ?> </div><!-- #comments .comments-area --> В гугле много чего интересного шел на эту тему, но мало что помогает. Ибо некотые правят файлы ВП, другие наоборот файлы шаблона. Попробую взять файл комментов из стандартной темы и уже потом буду править его. Сообщение отредактировал grumdas - 20.11.2015, 0:02
Причина редактирования: спойлер
|
|
|
Gerga |
14.11.2015, 12:41;
Ответить: Gerga
Сообщение
#6
|
|
|
|
|
syd2010
|
Сообщение
#7
|
|
Gerga, примерно так и делаю
|
|
|
Gerga |
19.11.2015, 23:26;
Ответить: Gerga
Сообщение
#8
|
|
Badmaestr,
Код function action_comment_form_before() {
ob_start(); } add_action( 'comment_form_before', 'action_comment_form_before' ); function action_comment_form_after() { $html = ob_get_clean(); $html = preg_replace( '/<h3 id="reply-title"(.*)>(.*)<\/h3>/', '<span id="reply-title"\1>\2</span>', $html ); echo $html; } add_action( 'comment_form_after', 'action_comment_form_after' ); Сообщение отредактировал Gerga - 19.11.2015, 23:27 |
|
|
Badmaestro |
20.11.2015, 18:11;
Ответить: Badmaestro
Сообщение
#9
|
|
|
function action_comment_form_after Не совсем понял, где нашелся такой кусок кода? о_О У меня было что-то наподобие этого: Код <div class="clear"></div> <div id="comments" class="comments-area"> <?php // You can start editing here -- including this comment! ?> <?php if ( have_comments() ) : ?> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> <p class="screen-reader-text"><?php _e( 'Comment navigation', 'the-wp' ); ?></p> <div class="nav-links"> <div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'the-wp' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'the-wp' ) ); ?></div> </div><!-- .nav-links --> </nav><!-- #comment-nav-above --> <?php endif; // check for comment navigation ?> <ol class="comment-list">
-------------------- |
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
Нужен кодер, чтобы пофиксить ошибку Wordpress после переноса сайта | 0 | Alex-777 | 845 | 7.4.2024, 18:05 автор: Alex-777 |
|
Продам базу сайтов Wordpress в 16 миллионов доменов! Свежая сборка. | 17 | Boymaster | 10918 | 17.3.2024, 2:53 автор: Boymaster |
|
Перенос сайта на CMS Wordpress | 8 | freeax | 4956 | 10.3.2024, 14:58 автор: freeax |
|
Как влияют комментарии на продвижение? | 81 | Megaspryt | 12005 | 2.3.2024, 13:02 автор: toplinks |
|
Как настроить в WordPress для SEO оптимизации | 8 | rownong27 | 2474 | 2.3.2024, 12:59 автор: toplinks |
Текстовая версия | Сейчас: 19.4.2024, 10:11 |