ThemeShaper Forums » Thematic


Three column posts layout.

(2 posts)
  • Started 11 years ago by joshuaiz
  • Latest reply from joshuaiz
  • This topic is not resolved
  1. joshuaiz


    I'm trying to use a 3 column layout for posts inside the #content area in my Thematic child theme like on the front page.

    I found this which shows how to make a 2-column post page:

    function remove_index_loop() {
    remove_action('thematic_indexloop', 'thematic_index_loop');
    add_action('init', 'remove_index_loop');

    function snippet_index_loop() {
    global $post;
    /* Count the number of posts so we can insert a widgetized area */ $count = 1;
    while ( have_posts() ) : the_post() ?>
    <?php $counter++; ?>
    <div class="column <?php if ($counter == 1) { echo 'one'; } else { echo 'two'; $counter = 0; } ?>">
    <div class="clear-fix">
    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <?php thematic_postheader(); ?>
    <div class="entry-content">
    <?php the_excerpt(); ?>
    <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
    <?php thematic_postfooter(); ?>
    </div><!-- .post -->
    </div><!-- .clear-fix -->
    </div><!-- .column -->

    <?php comments_template();
    if ($count==$thm_insert_position) { get_sidebar('index-insert');}

    $count = $count + 1;
    add_action('thematic_indexloop', 'snippet_index_loop');


    I understand why this works, but on that page it says to add an elseif and change the counter. I'm just not totally clear on how to do this. After fiddling with it for a while I can't seem to get it to work.



    Posted 11 years ago #
  2. joshuaiz

    Just to clarify, it says to add an elseif and change the counter to get a 3-column layout.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.