Нужна помощь!!!

Тема в разделе "HTML и CSS", создана пользователем kilat, 8 окт 2014.

  1. kilat

    kilat Новичок

    С нами с:
    7 окт 2014
    Сообщения:
    2
    Симпатии:
    0
    Знакомо ли вам такая платформа, как WordPress? Там есть такая тема, как GeneratePress с 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 Generate
     */
    
    get_header(); ?>
    
    	<div id="primary" <?php generate_content_class();?>>
    		<main id="main" <?php generate_main_class(); ?> itemtype="http://schema.org/Blog" itemscope="itemscope" itemprop="mainContentOfPage" role="main">
    		<?php do_action('generate_before_main_content'); ?>
    		<?php if ( have_posts() ) : ?>
    
    			<?php /* Start the Loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php
    					/* Include the Post-Format-specific template for the content.
    					 * If you want to override 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 generate_content_nav( 'nav-below' ); ?>
    
    		<?php else : ?>
    
    			<?php get_template_part( 'no-results', 'index' ); ?>
    
    		<?php endif; ?>
    		<?php do_action('generate_after_main_content'); ?>
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php 
    do_action('generate_sidebars');
    get_footer();
    
    Я хочу сделать, чтобы на сайте посты выводились в три колонки. Все перепробывал -- ничто не помогает. ОЧЕНЬ НАДЕЮСЬ НА ВАШУ ПОМОЩЬ!!
     
  2. metadon

    metadon Активный пользователь

    С нами с:
    6 фев 2006
    Сообщения:
    779
    Симпатии:
    0
    Ну похоже the_post() или get_template_part отвечает за вывод списка постов.
    С начало без php реализуйте 3 колонки, а потом с помощью php эти посты расставьте по колонкам.
    В чём конкретно проблема?
     
  3. kilat

    kilat Новичок

    С нами с:
    7 окт 2014
    Сообщения:
    2
    Симпатии:
    0
    Проблема в том, что при вставке готового кода сайт не отвечает. Даже перестаёт открывается ето в wordpress называется "белый екран смерти". Я пробовал всё, все коды, нихрина не помагает(
     
  4. Хыиуду

    Хыиуду Активный пользователь

    С нами с:
    3 июн 2014
    Сообщения:
    618
    Симпатии:
    5
    Включите в php отображение ошибок.