Od 3 dni próbuje "zakodować" index w theme (WordPress) aby wyświetlał dwie kolumny wpisów:
1 | 2
3 | 4
5 | 6
itp...
Znalazłem pewne materiały ale nie potrafie je dobrze wdrążyć do pliku index.php
Korzystam z szablonu Path.
Wersja WordPress 3.5.1 PL(chyba ta najnowsza)
Znalazłem to: http://perishablepress.com/two-column-hori...ess-post-order/
Bardzo proszę o pomoc przy tym...
index.php
Kod
<?php
/**
* Index Template
*
* This is the default template. It is used when a more specific template can't be found to display
* posts. It is unlikely that this template will ever be used, but there may be rare cases.
*
* @package Path
* @subpackage Template
* @since 0.1.0
*/
get_header(); // Loads the header.php template. ?>
<?php do_atomic( 'before_content' ); // path_before_content ?>
<div id="content">
<?php do_atomic( 'open_content' ); // path_open_content ?>
<div class="hfeed">
<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?>
<?php if ( is_singular() ) { ?>
<?php do_atomic( 'after_singular' ); // path_after_singular ?>
<?php get_sidebar( 'after-singular' ); // Loads the sidebar-after-singular.php template. ?>
<?php comments_template( '/comments.php', true ); // Loads the comments.php template. ?>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
<?php endif; ?>
</div><!-- .hfeed -->
<?php do_atomic( 'close_content' ); // path_close_content ?>
<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
</div><!-- #content -->
<?php do_atomic( 'after_content' ); // path_after_content ?>
<?php get_footer(); // Loads the footer.php template. ?>
/**
* Index Template
*
* This is the default template. It is used when a more specific template can't be found to display
* posts. It is unlikely that this template will ever be used, but there may be rare cases.
*
* @package Path
* @subpackage Template
* @since 0.1.0
*/
get_header(); // Loads the header.php template. ?>
<?php do_atomic( 'before_content' ); // path_before_content ?>
<div id="content">
<?php do_atomic( 'open_content' ); // path_open_content ?>
<div class="hfeed">
<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?>
<?php if ( is_singular() ) { ?>
<?php do_atomic( 'after_singular' ); // path_after_singular ?>
<?php get_sidebar( 'after-singular' ); // Loads the sidebar-after-singular.php template. ?>
<?php comments_template( '/comments.php', true ); // Loads the comments.php template. ?>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
<?php endif; ?>
</div><!-- .hfeed -->
<?php do_atomic( 'close_content' ); // path_close_content ?>
<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
</div><!-- #content -->
<?php do_atomic( 'after_content' ); // path_after_content ?>
<?php get_footer(); // Loads the footer.php template. ?>