VIP SeoSergey 435 Posted February 9, 2014 VIP Report Share Posted February 9, 2014 Здравствуйте! Вот так отображаются фильмы на главное странице и категориях (index.php и archive.php ) WP: Но при результатах поиска, записи отображаться следующим образом: Содержимое файлов index.php, archive.php и search.php одинаковое! Почему тогда при результат поиска нет картинки и весь текст в куче? На сайте установлена тема "audi gtr fleximag". Link to post Share on other sites
Модератор files 2843 Posted February 9, 2014 Модератор Report Share Posted February 9, 2014 Выложите содержимое archive.php и search.php - так станет понятнее SeoSergey 1 Link to post Share on other sites
VIP SeoSergey 435 Posted February 9, 2014 Author VIP Report Share Posted February 9, 2014 Выложите содержимое archive.php и search.php - так станет понятнее <?php get_header(); ?> <div class="art-content-layout"> <div class="art-content-layout-row"> <?php include (TEMPLATEPATH . '/sidebar1.php'); ?><div class="art-layout-cell art-content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="art-post"> <div class="art-post-tl"></div> <div class="art-post-tr"></div> <div class="art-post-bl"></div> <div class="art-post-br"></div> <div class="art-post-tc"></div> <div class="art-post-bc"></div> <div class="art-post-cl"></div> <div class="art-post-cr"></div> <div class="art-post-cc"></div> <div class="art-post-body"> <div class="art-post-inner art-article"> <?php $page_title = get_post_meta($post->ID, 'page_title', TRUE); ?> <?php if (!$page_title == 'No') { ?> <h2 class="art-postheader"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"> <?php the_title(); ?> </a> </h2> <?php } ?> <?php $icons = array(); ?> <?php if (!is_page()): ?> <?php endif; ?> <div class="art-postcontent"> <!-- article-content --> <?php if (is_search()) the_excerpt(); else the_content(__('')); ?> <?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <div class="morelink"><a href="<?php the_permalink() ?>"><span style="color: #000000;"><strong>Смотреть онлайн</strong></span></a></div> <!-- /article-content --> </div> <div class="cleared"></div> <?php ob_start(); ?> <?php $icons = array(); ?> <?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?> <div class="art-postfootericons art-metadata-icons"> <?php echo implode(' | ', $icons); ?> </div> <?php endif; ?> <?php $metadataContent = ob_get_clean(); ?> <?php if (trim($metadataContent) != ''): ?> <?php endif; ?> </div> <div class="cleared"></div> </div> </div> <?php endwhile; ?> <?php $prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick')); $next_link = get_next_posts_link(__('« Older Entries', 'kubrick')); ?> <?php if ($prev_link || $next_link): ?> <div class="art-post"> <div class="art-post-tl"></div> <div class="art-post-tr"></div> <div class="art-post-bl"></div> <div class="art-post-br"></div> <div class="art-post-tc"></div> <div class="art-post-bc"></div> <div class="art-post-cl"></div> <div class="art-post-cr"></div> <div class="art-post-cc"></div> <div class="art-post-body"> <div class="art-post-inner art-article"> <div class="art-postcontent"> <!-- article-content --> <div class="pagenavi"> <?php if(function_exists('wp_pagenavi')) { ?> <div class="wp-pagenavi"> <?php wp_pagenavi(); ?> </div> <?php } else {?> <div class="page-nav"> <div class="nav-previous"> <?php previous_posts_link('Предыдущая') ?> </div> <div class="nav-next"> <?php next_posts_link('Следующая') ?> </div> </div> <? } ?> </div> <!-- /article-content --> </div> <div class="cleared"></div> </div> <div class="cleared"></div> </div> </div> <?php endif; ?> <?php else : ?> <h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2> <p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p> <?php if(function_exists('get_search_form')) get_search_form(); ?> <?php endif; ?> </div> <?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div> </div> <div class="cleared"></div> <?php get_footer(); ?> Вот такой вид на данный момент у index.php, archive.php и search.php Link to post Share on other sites
Michael 95 Posted February 9, 2014 Report Share Posted February 9, 2014 А ты уверен, что он точно такой у всех? Может быть там одну строку потерял и уже разный вывод. Link to post Share on other sites
VIP SeoSergey 435 Posted February 9, 2014 Author VIP Report Share Posted February 9, 2014 А ты уверен, что он точно такой у всех? Может быть там одну строку потерял и уже разный вывод. Уверен. Проверял не один раз. Link to post Share on other sites
chlenberlen 5 Posted February 9, 2014 Report Share Posted February 9, 2014 <?php if (is_search()) the_excerpt(); else the_content(__('')); ?><?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> В этих строках косяк Link to post Share on other sites
Модератор files 2843 Posted February 9, 2014 Модератор Report Share Posted February 9, 2014 Поменяйте <?php if (is_search()) the_excerpt(); else the_content(__('')); ?> на <?php if (is_search()) the_content(__('')); else the_content(__('')); ?> SeoSergey 1 Link to post Share on other sites
VIP SeoSergey 435 Posted February 9, 2014 Author VIP Report Share Posted February 9, 2014 Поменяйте <?php if (is_search()) the_excerpt(); else the_content(__('')); ?> на <?php if (is_search()) the_content(__('')); else the_content(__('')); ?> Большое спасибо! Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now