Почему не работает main loop код дочерней темы
-
Код в шаблоне дочерней темы которая в папке
/twentytwelveChild/page-templates/all-article.php
<?php /** * Template Name: All Article * * Description: Twenty Twelve loves the no-sidebar look as much as * you do. Use this page template to remove the sidebar from any page. * * Tip: to remove the sidebar from all posts and pages simply remove * any active widgets from the Main Sidebar area, and the sidebar will * disappear everywhere. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ define('WP_USE_THEMES', false); get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> <?php get_footer(); ?>
Но почему то код не выводит записей.
Просмотр 2 ответов — с 1 по 2 (всего 2)
Просмотр 2 ответов — с 1 по 2 (всего 2)
- Тема «Почему не работает main loop код дочерней темы» закрыта для новых ответов.