👍 Научим бесплатно правильно создавать сайты на WordPress. Подробнее →
После обновления перестало отображаться содержимое статичной страницы в дополнительных шаблонах.
Конструкция [code inline=”yes”]
почему-то перестала работать. Пример:
На самом деле, помимо дописанного в шаблоне кода, есть еще содержание страницы, но почему-то оно не отображается. А вот в шаблоне page.php все нормально:
Кто-нибудь сталкивался с подобной проблемой? В чем может быть ошибка?


Трудно что-либо сказать, так как не ясно, что в коде single.php. Не думаю, что дело в обновлении.
<?php /* Template Name: Все игры, сортировка + мета */ ?> <?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } $dateformat = get_option('date_format'); $timeformat = get_option('time_format'); ?> <?php get_header(); ?> <div id="frame"> <div id="content"> <div class="wrapper"> <div id="main"> <div class="title breadcrumbs"> <?php echo '<h3>'; wpzoom_breadcrumbs(); echo'</h3>'; ?> </div> <div id="single"> <div class="box box-single"> <div class="postcontent"> <?php the_content(); ?> <table class="bordered games"> <thead> <tr> <th>Игра</th> <th>Жанр</th> <th>Издатель</th> <th>Дата релиза</th> </tr> </thead> <?php global $post; $args = array( 'posts_per_page' => 500, 'post_type' => games, 'order' => ASC, 'orderby' => 'title', 'category__not_in' => 18); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <tr> <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></td> <td><?php echo get_the_term_list( $post->ID, 'genre', '', ', ', '' ) ?></td> <td><?php echo get_the_term_list( $post->ID, 'publisher', '', ', ', '' ) ?></td> <td><?php $rdate_inexact = get_post_meta($post->ID, 'rdate_inexact_text', true); $rdate_exact = get_post_meta($post->ID, 'rdate_exact', true); print_r ($rdate_exact); if($rdate_inexact != '') { echo $rdate_inexact; } else { echo ''; } ?></td> </tr> <?php endforeach; ?> </table> </div> <div class="cleaner"> </div> </div><!-- end .box --> </div><!-- end #single --> <div class="cleaner"> </div> </div><!-- end #main --> <div id="sidebar"> <?php get_sidebar(); ?> </div><!-- end #sidebar --> <div class="cleaner"> </div> </div><!-- end .wrapper --> </div><!-- end #content --> </div><!-- end #frame --> <?php get_footer(); ?>здесь не работает
Меня смущает “Template Name: Все игры, сортировка + мета” по-русски. Может лучше название шаблона по-английски?
Если убрать цикл постов после the_content?
А вот тут – работает
<?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } $dateformat = get_option('date_format'); $timeformat = get_option('time_format'); ?> <?php get_header(); ?> <div id="frame"> <div id="content"> <div class="wrapper"> <div id="main"> <?php wp_reset_query(); if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="single"> <div class="title breadcrumbs"> <?php echo '<h3>'; wpzoom_breadcrumbs(); echo'</h3>'; ?> </div><!-- end .title --> <div class="box box-single"> <?php if (strlen($wpzoom_ad_content_imgpath) > 1 && $wpzoom_ad_content_select == 'Yes' && $wpzoom_ad_content_pos == 'Before') { echo '<div class="banner">'.stripslashes($wpzoom_ad_content_imgpath)."</div>"; }?> <h1 class="title page"><?php the_title(); ?></h1> <?php edit_post_link( __('Edit this page »', 'wpzoom'), '', ''); ?> <div class="postcontent"> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages', 'wpzoom').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> <div class="cleaner"> </div> <?php if (strlen($wpzoom_ad_content_imgpath) > 1 && $wpzoom_ad_content_select == 'Yes' && $wpzoom_ad_content_pos == 'After') { echo '<div class="banner">'.stripslashes($wpzoom_ad_content_imgpath)."</div>"; }?> </div><!-- end .box --> <?php comments_template(); ?> </div><!-- end #single --> <div class="cleaner"> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria', 'wpzoom');?>.</p> <?php endif; ?> </div><!-- end #main --> <div id="sidebar"> <?php get_sidebar(); ?> </div><!-- end #sidebar --> <div class="cleaner"> </div> </div><!-- end .wrapper --> </div><!-- end #content --> </div><!-- end #frame --> <?php get_footer(); ?>Смотрю в книгу – вижу фигу( не могу понять, где собака порылась. До обновления точно работало.
Название шаблона поменяла, цикл пробовала убирать – не помогло
tiaurus, спасибо, что заставил включить голову :)
Не хватало конструкции
до и
после