Ответы в темах

Просмотр 15 ответов — с 1 по 15 (всего 21)
  • Вообще-то уже сделал — вот код файла:

    <?php get_header(); ?>
    <div class="content">
    	<div class="posts">
    	<?php if(have_posts()): ?>
    		<?php while(have_posts()): the_post(); ?>
    			<article class="post">
    				<p class="date"><?php the_time('d/m'); ?> <span><?php the_time('Y'); ?></span></p>
    				<h2 class="title"><?php the_title() ?></h2>
    				<?php the_post_thumbnail(array(733, 'auto'), array('class' => 'post-thumbnail')); ?>
    				<?php the_content('Далее'); ?>
    				<div class="social">
    						<!-- Put this div tag to the place, where the Like block will be -->
    						<div id="vk_like-<?php echo get_the_ID(); ?>" class="vk_like"></div>
    						<script type="text/javascript">
    							VK.Widgets.Like("vk_like-<?php echo get_the_ID(); ?>", {type: "button", pageTitle: "<?php the_title() ?>", pageUrl: "<?php the_permalink(); ?>"});
    						</script>
    						<div class="fb-like" data-href="<?php the_permalink(); ?>" data-send="false" data-layout="button_count" data-width="250" data-show-faces="true"></div>
    					<?php
    						if (function_exists('sociable_html')) {
    							echo sociable_html(array('ВКонтакте', 'Facebook', 'Twitter', 'Одноклассники', 'Мой Мир', 'LiveJournal', 'Memori.ru', 'Google'));
    						}
    					?>
    				</div>
    			</article>
    
    		 <script type="text/javascript">
    					jQuery(function() {
    						jQuery( "#tabs" ).tabs({ fx: { opacity: 'toggle' } });
    					});
    			</script>
    			<div id="tabs">
    				<ul>
    					<li><a href="#tabs-1">VK комментарии</a></li>
    					<li><a href="#tabs-2">Facebook комментарии</a></li>
                                            <li><a href="#tabs-3">Коментарии</a></li>
    				</ul>
    				<div id="tabs-1">
    					<!-- Put this div tag to the place, where the Comments block will be -->
    					<div id="vk_comments"></div>
    					<script type="text/javascript">
    					VK.Widgets.Comments("vk_comments", {limit: 10, width: "470", attach: "*"}, '<?php echo get_the_ID(); ?>');
    					</script>
    
    				</div>
    				<div id="tabs-2">
    					<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="2" data-width="470"></div>
    				</div>
                                    <div id="tabs-3">
                                       <?php comments_template( '', true ); ?>
    				</div>
    			</div>
    		<?php endwhile; ?>
    	<?php endif; ?>
    	</div>
    	<?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

    результата никакого

    Толку никакого и в табах посмотрите они не закомментированы, форма есть, комментарии добавляются, но не отображаются на сайте
    [URL=http://s2.ipicture.ru/Gallery/Viewfull/19811133.html][IMG]http://s2.ipicture.ru/uploads/20121217/thumbs/GYf733t5.jpg[/IMG][/URL]

    А вот сам сайт http://blog.fotouniver.ru/
    Помогите уже вторую неделю бьюсь

    Да, есть вот файл:

    <?php get_header(); ?>
    <div class="content">
    	<div class="posts">
    	<?php if(have_posts()): ?>
    		<?php while(have_posts()): the_post(); ?>
    			<article class="post">
    				<p class="date"><?php the_time('d/m'); ?> <span><?php the_time('Y'); ?></span></p>
    				<h2 class="title"><?php the_title() ?></h2>
    				<?php the_post_thumbnail(array(733, 'auto'), array('class' => 'post-thumbnail')); ?>
    				<?php the_content('Далее'); ?>
    				<div class="social">
    						<!-- Put this div tag to the place, where the Like block will be -->
    						<div id="vk_like-<?php echo get_the_ID(); ?>" class="vk_like"></div>
    						<script type="text/javascript">
    							VK.Widgets.Like("vk_like-<?php echo get_the_ID(); ?>", {type: "button", pageTitle: "<?php the_title() ?>", pageUrl: "<?php the_permalink(); ?>"});
    						</script>
    						<div class="fb-like" data-href="<?php the_permalink(); ?>" data-send="false" data-layout="button_count" data-width="250" data-show-faces="true"></div>
    					<?php
    						if (function_exists('sociable_html')) {
    							echo sociable_html(array('ВКонтакте', 'Facebook', 'Twitter', 'Одноклассники', 'Мой Мир', 'LiveJournal', 'Memori.ru', 'Google'));
    						}
    					?>
    				</div>
    			</article>
    
    		 <script type="text/javascript">
    					jQuery(function() {
    						jQuery( "#tabs" ).tabs({ fx: { opacity: 'toggle' } });
    					});
    			</script>
    			<div id="tabs">
    				<ul>
    					<li><a href="#tabs-1">VK комментарии</a></li>
    					<li><a href="#tabs-2">Facebook комментарии</a></li>
                                            <li><a href="#tabs-3">Коментарии</a></li>
    				</ul>
    				<div id="tabs-1">
    					<!-- Put this div tag to the place, where the Comments block will be -->
    					<div id="vk_comments"></div>
    					<script type="text/javascript">
    					VK.Widgets.Comments("vk_comments", {limit: 10, width: "470", attach: "*"}, '<?php echo get_the_ID(); ?>');
    					</script>
    
    				</div>
    				<div id="tabs-2">
    					<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="2" data-width="470"></div>
    				</div>
                                    <div id="tabs-3">
                                       <?php comments_template( $file, $separate_comments ); ?>
    				</div>
    			</div>
    			<?php //comments_template( '', true ); ?>
    		<?php endwhile; ?>
    	<?php endif; ?>
    	</div>
    	<?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

    Сам нашёл плагин quotes-collection

    Да вы были правы в файле content.php я добавил вывод с помощью функции

    <?php $author = get_the_author();
        echo "Автор поста: ". $author; ?>

    Вставив еёё в файл в следующем месте

    <?php
    /**
     * The default template for displaying content
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>
    
    			<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="entry-meta">
    				<?php twentyeleven_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    
    			<?php if ( comments_open() && ! post_password_required() ) : ?>
    			<div class="comments-link">
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
    			</div>
    			<?php endif; ?>
    		</header><!-- .entry-header -->
    
    		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    
    		<footer class="entry-meta">
                            <?php $author = get_the_author();
    echo "Автор: ". $author; //Выводим имя автора под анонсом ?>
                            <span class="sep"> | </span>
    			<?php $show_sep = false; ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
    				if ( $categories_list ):
    			?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if categories ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if $tags_list ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
    
    			<?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    			<?php endif; // End if comments_open() ?>
    
    			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post-<?php the_ID(); ?> -->

    <?php
    /**
     * The default template for displaying content
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>
    
    			<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="entry-meta">
    				<?php twentyeleven_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    
    			<?php if ( comments_open() && ! post_password_required() ) : ?>
    			<div class="comments-link">
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
    			</div>
    			<?php endif; ?>
    		</header><!-- .entry-header -->
    
    		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    
    		<footer class="entry-meta">
    			<?php $show_sep = false; ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
    				if ( $categories_list ):
    			?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if categories ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if $tags_list ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
    
    			<?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    			<?php endif; // End if comments_open() ?>
    
    			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post-<?php the_ID(); ?> -->

    category.php

    <?php
    /**
     * The template for displaying Category Archive pages.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<section id="primary">
    			<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    				<header class="page-header">
    					<h1 class="page-title"><?php
    						printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    					?></h1>
    
    					<?php
    						$category_description = category_description();
    						if ( ! empty( $category_description ) )
    							echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
    					?>
    				</header>
    
    				<?php twentyeleven_content_nav( 'nav-above' ); ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    			</div><!-- #content -->
    		</section><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Помогите пожалуйста

    Вот index.php

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     */
    
    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php twentyeleven_content_nav( 'nav-above' ); ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<?php endwhile; ?>
    
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    А в каком месте — извините с программированием пока не знаком
    вот файл archiv.php

    <?php
    /**
     * The template for displaying Archive pages.
     *
     * Used to display archive-type pages if nothing more specific matches a query.
     * For example, puts together date-based pages if no date.php file exists.
     *
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<section id="primary">
    			<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    				<header class="page-header">
    					<h1 class="page-title">
    						<?php if ( is_day() ) : ?>
    							<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
    						<?php elseif ( is_month() ) : ?>
    							<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
    						<?php elseif ( is_year() ) : ?>
    							<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
    						<?php else : ?>
    							<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
    						<?php endif; ?>
    					</h1>
    				</header>
    
    				<?php twentyeleven_content_nav( 'nav-above' ); ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    			</div><!-- #content -->
    		</section><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Я не могу найти куда вставлять

    А где это, в каком файле?

    вот сайт http://blog.fotouniver.ru

    Да конечно, без результатов.

    Помогите же кто-нибудь. Перечитал все ответы на форуме. На странице где необходимы комментарии код
    <?php comments_template(); ?> есть, форма добавления комментариев есть, комментарии в админке появляются, а на странице не отображаются, кеширующих плагинов нет

Просмотр 15 ответов — с 1 по 15 (всего 21)