{"id":255,"date":"2008-04-02T04:50:31","date_gmt":"2008-04-02T01:50:31","guid":{"rendered":"http:\/\/www.sonika.ru\/blog\/wordpress\/post-columns.htm"},"modified":"2010-06-28T11:51:46","modified_gmt":"2010-06-28T08:51:46","slug":"post-columns","status":"publish","type":"post","link":"http:\/\/www.sonika.ru\/blog\/wordpress\/post-columns.htm","title":{"rendered":"\u041f\u043e\u0441\u0442\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a"},"content":{"rendered":"<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 2 \u0438 \u0431\u043e\u043b\u0435\u0435  \u043a\u043e\u043b\u043e\u043d\u043e\u043a - \u0442.\u0435. \u043f\u043e\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0446\u0438\u043a\u043b\u043e\u043c (Loop). \u0412\u0441\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b css \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0422\u0435\u043c\u0435 default.<br \/>\n<!--more--><br \/>\n\u041a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, style.css (\u0432 \u043f\u0430\u043f\u043a\u0435 \u0422\u0435\u043c\u044b). \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0422\u0435\u043c\u044b, \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u044d\u0442\u043e home.php \u0438\u043b\u0438 index.php \u0432 \u043f\u0430\u043f\u043a\u0435 \u0422\u0435\u043c\u044b, \u0434\u043b\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 - category.php \u0438 <a href=\"http:\/\/www.sonika.ru\/blog\/wordpress\/template-hierarchy.htm\">\u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435<\/a>.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 2 \u043a\u043e\u043b\u043e\u043d\u043a\u0438<\/h2>\n<h3>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h3>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"http:\/\/www.cre8d-design.com\/blog\/2008\/03\/01\/how-to-organize-posts-into-two-side-by-side-columns-in-wordpress\/\">How to organize posts into two side-by-side columns in WordPress<br \/>\n<\/a>\u0414\u0435\u043c\u043e-\u0431\u043b\u043e\u0433: <a href=\"http:\/\/www.cre8d-design.com\/demo\/\">\u043f\u043e\u0441\u0442\u044b \u0432 2 \u043a\u043e\u043b\u043e\u043d\u043a\u0438<\/a> \u0438 <a href=\"http:\/\/www.cre8d-design.com\/posts-in-columns-template-example\/\">\u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/p>\n<p>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0446\u0438\u043a\u043b (\u043e\u043d \u0436\u0435 <a href=\"http:\/\/codex.wordpress.org\/The_Loop\">Loop<\/a>)<\/p>\n<pre><code class=\"php\">\r\n&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;\r\n  &lt;div class=\"post\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;\r\n  &lt;h2&gt;&lt;a href=\"&lt;?php the_permalink() ?&gt;\" rel=\"bookmark\" title=\"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 &lt;?php the_title(); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\r\n  &lt;small&gt;&lt;?php the_time('F j, Y') ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;\/small&gt;\r\n  &lt;div class=\"entry\"&gt;\r\n  &lt;?php the_content('\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435  \u00bb'); ?&gt;\r\n  &lt;\/div&gt;\r\n  &lt;p class=\"postmetadata\"&gt;&lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c', '', ' | '); ?&gt;\r\n  &lt;?php comments_popup_link('\u041d\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u00bb', '\u041e\u0434\u0438\u043d \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u00bb', '\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432: %'); ?&gt;&lt;\/p&gt;\r\n  &lt;\/div&gt;\r\n&lt;?php endwhile; else : ?&gt;\r\n   &lt;h2 class=\"center\"&gt;\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e&lt;\/h2&gt;\r\n   &lt;p class=\"center\"&gt;\u0417\u0434\u0435\u0441\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:&lt;\/p&gt;\r\n   &lt;?php include (TEMPLATEPATH . \"\/searchform.php\"); ?&gt;\r\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e:<\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0446\u0438\u043a\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>&lt;?php $col = 1; ?&gt;<\/code><\/li>\n<li>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0446\u0438\u043a\u043b\u0430 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <code>&lt;?php if ($col == 1) echo \"&lt;div class=\\\"row\\\"&gt;\"; ?&gt;<\/code><\/li>\n<li>\u0412\u043c\u0435\u0441\u0442\u043e  <code>&lt;div class=\"post\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;<\/code> \u043f\u0438\u0448\u0435\u043c <code>&lt;div class=\"post col&lt;?php echo $col;?&gt;\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;<\/code> \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441  col1 \u0438\u043b\u0438 col2 \u043a <code>&lt;div class=\"post\"&gt;<\/code><\/li>\n<li>\u041f\u0435\u0440\u0435\u0434 <code>&lt;?php endwhile; else: ?&gt;<\/code> \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <code>&lt;?php if ($col == 1) echo \"&lt;\/div&gt;\"; (($col==1) ? $col=2 : $col=1); ?&gt;<\/code><\/li>\n<\/ol>\n<p><a title=\"the-first\" name=\"the-first\"><\/a>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"php\">\r\n&lt;?php $col = 1; ?&gt;\r\n&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;\r\n&lt;?php if ($col == 1) echo \"&lt;div class=\\\"row\\\"&gt;\"; ?&gt;\r\n  &lt;div class=\"post col&lt;?php echo $col;?&gt;\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;\r\n  &lt;h2&gt;&lt;a href=\"&lt;?php the_permalink() ?&gt;\" rel=\"bookmark\" title=\"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 &lt;?php the_title(); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\r\n  &lt;small&gt;&lt;?php the_time('F j, Y') ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;\/small&gt;\r\n  &lt;div class=\"entry\"&gt;\r\n  &lt;?php the_content('\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435  \u00bb'); ?&gt;\r\n  &lt;\/div&gt;\r\n  &lt;p class=\"postmetadata\"&gt;&lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c', '', ' | '); ?&gt;\r\n  &lt;?php comments_popup_link('\u041d\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u00bb', '\u041e\u0434\u0438\u043d \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u00bb', '\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432: %'); ?&gt;&lt;\/p&gt;\r\n  &lt;\/div&gt;\r\n&lt;?php if ($col == 1) echo \"&lt;\/div&gt;\"; (($col==1) ? $col=2 : $col=1); ?&gt;\r\n&lt;?php endwhile; else : ?&gt;\r\n   &lt;h2 class=\"center\"&gt;\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e&lt;\/h2&gt;\r\n   &lt;p class=\"center\"&gt;\u0417\u0434\u0435\u0441\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:&lt;\/p&gt;\r\n   &lt;?php include (TEMPLATEPATH . \"\/searchform.php\"); ?&gt;\r\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>\u0412 \u0432 style.css \u0441\u0432\u043e\u0435\u0439 \u0422\u0435\u043c\u044b:<\/p>\n<pre><code>.row { clear: both; }\r\n.col1 { width: 200px; float: left; padding: 0 10px; }\r\n.col2 { width: 200px; float: right;  padding: 0 10px; }<\/code><\/pre>\n<h3>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h3>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"http:\/\/blog.portal.kharkov.ua\/\">\u0434\u043e\u0441\u0442\u043e\u043f\u043e\u0447\u0442\u0435\u043d\u043d\u044b\u0439 \u042e.\u0411.<\/a>, <a href=\"http:\/\/mywordpress.ru\/support\/viewtopic.php?id=1529\">\u0442\u043e\u043f\u0438\u043a<\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 mywordpress  \u0438 \u0422\u0435\u043c\u0430 <a href=\"http:\/\/warpspire.com\/hemingway\">hemingway<\/a><\/p>\n<pre><code class=\"php\">\r\n&lt;?php if (have_posts()) : ?&gt;\r\n&lt;?php $first = true; ?&gt;\r\n&lt;?php while (have_posts()) : the_post(); ?&gt;\r\n  &lt;div class=\"post &lt;?php if($first == true) echo \"first\" ?&gt;\" id=\"post-&lt;?php the_ID(); ?&gt;\"&gt;\r\n  &lt;h2&gt;&lt;a href=\"&lt;?php the_permalink() ?&gt;\" rel=\"bookmark\" title=\"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 &lt;?php the_title(); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\r\n  &lt;small&gt;&lt;?php the_time('F j, Y') ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;\/small&gt;\r\n  &lt;div class=\"entry\"&gt;\r\n  &lt;?php the_content('\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435  \u00bb'); ?&gt;\r\n  &lt;\/div&gt;\r\n  &lt;p class=\"postmetadata\"&gt;&lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c', '', ' | '); ?&gt;\r\n  &lt;?php comments_popup_link('\u041d\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u00bb', '\u041e\u0434\u0438\u043d \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u00bb', '\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432: %'); ?&gt;&lt;\/p&gt;\r\n  &lt;\/div&gt;\r\n&lt;?php $first = !$first; if ($first) echo '&lt;br clear=all&gt;'; ?&gt;\r\n&lt;?php endwhile; else : ?&gt;\r\n   &lt;h2 class=\"center\"&gt;\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e&lt;\/h2&gt;\r\n   &lt;p class=\"center\"&gt;\u0417\u0434\u0435\u0441\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:&lt;\/p&gt;\r\n   &lt;?php include (TEMPLATEPATH . \"\/searchform.php\"); ?&gt;\r\n&lt;?php endif; ?&gt;\r\n<\/code><\/pre>\n<p>\u0418 \u0432 style.css \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:<\/p>\n<pre><code>\r\n.post { float:left; width:215px; margin:0; }\r\n.first  { margin:0 20px 0 0; }\r\n<\/code><\/pre>\n<p>\u041e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 2 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430  col1 \u0438 col2, \u0430 \u043e\u0434\u0438\u043d - first, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u043c \u043f\u043e\u0441\u0442\u0430\u043c (\u0442.\u0435. \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435).  \u0418 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u0441\u0442\u044b \u0444\u043b\u043e\u0430\u0442\u044f\u0442\u0441\u044f \u0432\u043b\u0435\u0432\u043e, \u0430 \u043d\u0435 \u0432\u043b\u0435\u0432\u043e-\u0432\u043f\u0440\u0430\u0432\u043e, \u043a\u0430\u043a \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435.<\/p>\n<h3>\u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h3>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0438\u043b\u0435\u0439 - \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0448\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u043b\u043e\u043a\u0430 (\u043f\u043e\u0441\u0442\u0430) \u043d\u0430\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430.  \u0412 \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0432\u0443\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043c\u044b \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0438\u0440\u0438\u043d\u0443 \u0431\u043b\u043e\u043a\u0430. \u0418\u0442\u0430\u043a, \u043f\u0443\u0441\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0430 \u0431\u043b\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 200 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 180 \u043f\u0438\u043a\u0441.:<\/p>\n<pre><code>.post { display: block; float: left; width: 200px; height: 180px;\r\npadding: 5px; margin: 0 15px 15px 0; overflow: hidden; }<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u043b\u043e\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 (index.php \u0438\u043b\u0438 home.php) \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435 \u0442\u0435\u043a\u0441\u0442, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u043f\u0440\u0435\u0432\u044c\u044e \u0438\u0437 \u043f\u043e\u0441\u0442\u0430. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \"\u043a\u043e\u043b\u043e\u043d\u043e\u043a\" \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0448\u0438\u0440\u0438\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0422\u0435\u043c\u044b default \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f 2 \u043a\u043e\u043b\u043e\u043d\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0443\u0442\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b style.css \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0422\u0435\u043c\u044b.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 3 \u043a\u043e\u043b\u043e\u043d\u043a\u0438<\/h2>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a:  <a href=\"http:\/\/netcovered.com\/wordpress-posts-in-different-columns\/\">WordPress Posts in Different Columns<\/a><br \/>\n\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 <a href=\"#the-first\">\u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/a> \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0434\u0430, \u0432\u043c\u0435\u0441\u0442\u043e<\/p>\n<pre><code class=\"php\">&lt;?php if ($col == 1) echo \u201c&lt;\/div&gt;\u201d; (($col==1) ? $col=2 : $col=1);  ?&gt;<\/code><\/pre>\n<p>\u043f\u0438\u0448\u0435\u043c:<\/p>\n<pre><code class=\"php\">&lt;?php if ($col == 1) echo \u201c&lt;\/div&gt;\u201d; if($col == 1) {$col = 2;}  else { if($col != 1) { if($col == 3) {$col = 1;} if($col == 2) {$col =  3;} } } ?&gt;<\/code><\/pre>\n<p>\u0418 css:<\/p>\n<pre><code>.row  { clear: both; }\r\n.col1 { width: 130px; float: left; padding: 0 10px; }\r\n.col2 { width: 130px; float: left;  padding: 0 10px; }\r\n.col3 { width: 130px; float: right;  padding: 0 10px; }<\/code><\/pre>\n<p style=\"clear: both; float: none; background-color: #ffff99\">UPD 03.04.2008<\/p>\n<h3>\u0411\u043e\u043d\u0443\u0441: \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a<\/h3>\n<p style=\"clear: both; float: none\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"http:\/\/www.samburdge.co.uk\/wordpress\/wp-post-columns-plugin\">WP Post Columns Plugin<\/a><br \/>\n\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442: \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0442\u0435\u0433\u043e\u0432 <code>{columnX}<\/code> \u0438 <code>{\/columnX}<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043f\u043e\u0441\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a - \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435.  \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0438, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0438 \u0440\u0430\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n<p style=\"clear: both; float: none\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"http:\/\/wordpress.org\/extend\/plugins\/magazine-columns\/\">Magazine Columns<\/a><br \/>\n\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442: \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u0432\u0438\u0437. \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438\u043b\u0438 \u0442\u0435\u0433\u0430 <code>&lt;!--columns--&gt;<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 (\u043c\u0430\u043a\u0441. 5 \u043a\u043e\u043b\u043e\u043d\u043e\u043a). \u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f WordPress 2.7 \u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p style=\"clear: both; float: none\">\u0422\u0430\u043a\u0436\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0442\u0443\u0442:<br \/>\n<code>http:\/\/wordpress.org\/extend\/plugins\/tags\/columns<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 2 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a - \u0442.\u0435. \u043f\u043e\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0446\u0438\u043a\u043b\u043e\u043c (Loop). \u0412\u0441\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b css \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0422\u0435\u043c\u0435 default.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[31,28,30],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-loop","tag-wordpress-kak-cms","tag-wp-tricks"],"_links":{"self":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":1,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":985,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions\/985"}],"wp:attachment":[{"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sonika.ru\/blog\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}